All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- fix
start transaction
support (#386). Thanks @bmbferreira!
- added support for linux arm64 builds (#382).
- Add file violation count to summary report output (#378). Thanks @ermakov-oleg!
- added support windows builds (#368). Thanks @ermakov-oleg!
- improved docs for "disallowed-unique-constraint" (#370). Thanks @teeyingyap!
- fixed "prefer-robust-stmts" to work with RLS (#367)
- fix install for darwin-x86 (#361)
- fix build for macos arm64 (#356)
- support configuration for "fail_on_violations" via
upload_to_github.fail_on_violations
(#353) - support root flags within upload-to-github subcommand (#353)
- provided paths now support glob matching.
squawk 'migrations/*.sql'
(#352)
- added
--excluded-paths
flag andexcluded_paths = ["example.sql"]
configuration option to ignore paths when searching for files (#350). Thanks @rdaniels6813!
- add exceptions for
ban-concurrent-index-creation-in-transaction
to handle golang-migrate. Thanks @janrueth! (#339) - improve
disallowed-unique-constraint
to handlealter table...add column... unique
. (#337)
- added
ban-concurrent-index-creation-in-transaction
rule. Thanks @alixlahuec! (#335)
squawk upload-to-github
will always leave a pull request comment if files are evaluated. Previously if violations were resolved, stale warnings would be left in a comment. (#330)
- added
squawk upload-to-github --fail-on-violations
flag to exit with error if violations are found (#327). Thanks @wmartins!
- support parsing
alter database refresh collation
statements (#324)
- support parsing
alter table set
statements (#321)
- added
transaction-nesting
rule. Thanks @andrewsmith! (#303) - added
adding-required-field
rule fromadding-not-nullable-field
. Thanks @andrewsmith! (#301)
- functionality in
adding-not-nullable-field
for adding non-nullable fields was moved intoadding-required-field
. Thanks @andrewsmith! (#301)
- Only read from stdin when file paths are not provided. (#295)
- added
ban-drop-table
rule. Thanks @borisrozumnuk! (#286) - added
not-null-constraint
rule. Thanks @andrewsmith! (#288)
- Fixed building Squawk on platforms where
c_char
is unsigned. Thanks @ods! (#285) - Fixed Squawk compatiblity with Nix. Thanks @andrewsmith! (#287)
- Fixed regression in parsing union queries. Fixed parsing call statement. (#293)
- Upgrade libpg_query from 13 to 15. Thanks @andrewsmith! (#291)
- Better support non-volatile defaults for
adding-field-with-default
. (#278) - Static link for openssl and glibc. (#283)
- added
prefer-bigint-over-int
andprefer-bigint-over-smallint
to replaceprefer-big-int
. Thanks @aldenquimby! (#273)
- Support TableLikeClause in table creation. Thanks @qoelet! (#271)
- Recognize most DROP statements within a transaction as robust. Thanks @andrewsmith! (#276)
- added
--assume-in-transaction
flag and configuration option to indicate that each SQL file is wrapped in a transaction by an external tool. Thanks @andrewsmith! (#264)
- error parsing multiple transactions in one file (#259)
- added better error handling of invalid syntax. (#245)
- added
prefer-big-int
rule to prefer 64 bit types over 32 bit types. (#238) - added
prefer-identity
rule to preferidentity
columns overserial
columns. (#243)
- added
prefer-timestamptz
rule to warn about usingtimestamp
instead oftimestamptz
. (#230)
- only apply
prefer-robust-stmts
to files with more than one SQL statement. (#231)
- catch another way to add foreign keys for
adding-foreign-key-constraint
. Thanks @adamrdavid! (#228)
- added
pg_version
configuration option to support ignoring rules by Postgres version. Thanks @adamrdavid! (#219)
- internal: use rule IDs based on serde annotations of
RuleViolationKind
. (#218)
- fix parsing enum values from configuration file. (#217)
- added validation for configured rules. (#216)
- Change help menu value names. (#216)
- added configuration file (
.squawk.toml
) to specify excluded rules. (#213)
- incorrectly silenced stdin
- silence stdin if it's empty (#210)
- duplicate messages being written when using GitHub Actions token authentication. (#209)
- Support GitHub API authentication via GitHub Actions tokens. (#207)
- differentiate between
VOLATILE
and non-VOLATILE
defaults inadding-field-with-default
documentation (#201)
- require-concurrent-index-deletion rule and removed deletion warnings from require-concurrency-index-creation. Thanks @K-Phoen! (#177)
- errors parsing PG12 and later query syntax by upgrading to PG13 parser (#174)
- parsing alter constraint statement (#173)
- copy pasta of rename-table into the ban-drop-column rule (#168)
- parsing an index without a name specified (#169)
- false positives with disallowed-unique-constraint and adding-serial-primary-key-field. Thanks @qoelet! (#161)
- false positives with require-concurrent-index rule (#157)
- incorrect internal schema for "alter table" statements with function calls. Thanks @qoelet! (#154)
- incorrect internal schema for "create partition" statements. (#146)
upload-to-github
command not obeying top level--exclude
s. (#142)
- allowing adding not null column with default for
adding-not-null-field
. (#144)
- link to website for tty reporter when there are lint errors. (#120)
DROP INDEX
support for "require-concurrent-index-creation" and "prefer-robust-stmts". (#124)- github comment now includes Squawk's version number. (#131)
- new
ban-drop-column
rule (#132)
- updated "adding-not-null-field" to warn about making a column non-nullable with
NOT NULL
. See the "adding-not-null-field" docs for more information. (#101)
- false positive with
prefer-text-field
that wasn't allowingvarchar
without a length specified
- added "debug" option for
--dump-ast
to print out tree using Rust'sDebug
formatter (#92) - added new rule, "adding-foreign-key-constraint", to provide suggestions for safely adding foreign key constraints (#91)
- updated "robust-stmts" suggestions with caveat about
IF NOT EXISTS
(#95) - updated "constraint-missing-not-valid" to warn about adding a constraint as NOT VALID and then using "VALIDATE CONSTRAINT" in the same transaction (#97)
- updated "prefer-robust-stmts" with exception for using
DROP CONSTRAINT IF EXISTS
beforeADD CONSTRAINT
(#99)
- error reporting is more user friendly (#89, #90)
- parsing of RangeVar with missing inh field
- parsing of alter table with type cast
- parsing of create table with primary key constraint on two fields
- run
prefer-text-field
on alter table statments
- new rule
adding-primary-key-field
- parsing
->>
operator
- parse function calls in alter table statements
- new rule
ban-char-type
- upload-to-github comment formatting to hopefully be more clear
- docs on crates.io for sub crates
- new rule
prefer-robust-stmts
- upload-to-github commenting on PRs when no files provided (#30)
- remove
SQUAWK_GITHUB_BOT_NAME
env var for github upload, no longer needed (#27)
- false positive in unique constraint rule (#28)
- logging, mainly around upload-to-github (#24)
--stdin-filepath
argument (#23)- output a success message for CLI tty reporter (#22)
- prefix env vars with SQUAWK_ (#21)
- error level HTTP status codes not being errors (#20)
upload-to-github
subcommand for outputing squawk results in a GitHub PR comment.- print help menu when no options provided
- automatically detect stdin instead of using the
-
path
- off by one error in slicing problem SQL for the tty reporter
- documentation for rules
- release binaries
- CI
- Initial release