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.
- Only read from stdin when file paths are not provided. (#295)
- added
ban-drop-tablerule. Thanks @borisrozumnuk! (#286) - added
not-null-constraintrule. Thanks @andrewsmith! (#288)
- Fixed building Squawk on platforms where
c_charis 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-intandprefer-bigint-over-smallintto 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-transactionflag 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-intrule to prefer 64 bit types over 32 bit types. (#238) - added
prefer-identityrule to preferidentitycolumns overserialcolumns. (#243)
- added
prefer-timestamptzrule to warn about usingtimestampinstead oftimestamptz. (#230)
- only apply
prefer-robust-stmtsto 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_versionconfiguration 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
VOLATILEand non-VOLATILEdefaults inadding-field-with-defaultdocumentation (#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-githubcommand not obeying top level--excludes. (#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 INDEXsupport for "require-concurrent-index-creation" and "prefer-robust-stmts". (#124)- github comment now includes Squawk's version number. (#131)
- new
ban-drop-columnrule (#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-fieldthat wasn't allowingvarcharwithout a length specified
- added "debug" option for
--dump-astto print out tree using Rust'sDebugformatter (#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 EXISTSbeforeADD 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-fieldon 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_NAMEenv var for github upload, no longer needed (#27)
- false positive in unique constraint rule (#28)
- logging, mainly around upload-to-github (#24)
--stdin-filepathargument (#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-githubsubcommand 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