Releases: sbdchd/squawk
Fix Suggestions in CLI Output
Added
-
cli: rendering of diffs for suggestions in output. (#662)
We now include a diff below the rule error.
warning[require-concurrent-index-creation]: During normal index creation, table updates are blocked, but reads are still allowed. ╭▸ example.sql:10:1 │ 10 │ CREATE INDEX "field_name_idx" ON "table_name" ("field_name"); │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ │ ├ help: Use `concurrently` to avoid blocking writes. ╭╴ 10 │ CREATE INDEX concurrently "field_name_idx" ON "table_name" ("field_name"); ╰╴ ++++++++++++
Fixed
-
parser: parsing some
setrelated commands. (#657)The following now parse:
set schema 'foo'; set foo.bar from current; set bar from current;
Changed
Linter & Parser Improvements + Unicode
Added
-
linter:
adding-field-with-defaultnow allows more cases (#652).alter table t add column c text[] default array[]::text[]; alter table t add column c timestamptz default current_timestamp; -- const/non-volatile binary expressions are also allowed alter table t add column c timestamptz default now() - interval '100 years';
Fixed
-
parser: parse materialized views using a paren select (#651).
The following now parses:
create materialized view v as (select * from t);
Changed
- cli now uses unicode for snippet annotations (#654).
Fix for calling github API: add a user agent
Fixed
github: fix api calls failing with 403. (#643)
Linter additions & fixes, Dependency updates, and more!
Added
- linter:
--no-error-on-unmatched-patternargument to not exit with an error if no files are matched (default: false) (#639). Thanks @PascalFrenz! - linter: gitlab reporter (#624). Thanks @benedikt-bartscher!
Fixed
-
linter: adding-field-with-default now checks that the postgres version is
<= 11before reporting an error for non-volatile defaults (#637). Thanks @ermakov-oleg! -
linter: github commenting truncates when too large (#605). Thanks @ienugr!
-
parser: parsing path's named
operatornow works (#640).Previously the following would error:
create table operator();
-
squawk_syntax:
ast::BinExprlhs&rhsproperties now work correctly (#634). -
internal: bumped a bunch of outdated JS & Rust dependencies (#630), (#631), (#632), (#633).
More Quick Fixes + Lint Rule & Doc Fixes
Quick Fixes to Ignore Rules
Added
-
github: support overriding api url for github enterprise usage (#611). Thanks @jvatic!
-
lsp server: quick fix to open documentation for rule violation (#610)
-
lsp server: quick fixes to ignore rules for a line or entire file (#613)
Fixed
- linter: violations no longer include leading whitespace & comments in their range. (#612)
Initial Fix Support
Added
-
linter: add fixes for prefer-robust-stmts (currently LSP server only) (#602)
-
playground: add quick fix support (#606)
Fixed
- linter: fix comparison edge cases with identifiers (#600), (#601). Thanks @gilbsgilbs!
Fix Invalid Validation for Casts
Fixed
- parser: bugged warning for invalid casts that was warning about all casts inside function calls. (#598)