Skip to content

Releases: sbdchd/squawk

Fix Suggestions in CLI Output

24 Sep 03:33
7b0a32d

Choose a tag to compare

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 set related commands. (#657)

    The following now parse:

    set schema 'foo';
    set foo.bar from current;
    set bar from current;

Changed

  • internal: bump rust to 1.90.0 (#659)
  • syntax: fill out more of the ast (#658)

Linter & Parser Improvements + Unicode

16 Sep 03:36
1ed22e7

Choose a tag to compare

Added

  • linter: adding-field-with-default now 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

03 Sep 07:10
3fd7446

Choose a tag to compare

Fixed

github: fix api calls failing with 403. (#643)

Linter additions & fixes, Dependency updates, and more!

02 Sep 16:14
018affd

Choose a tag to compare

Added

  • linter: --no-error-on-unmatched-pattern argument 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 <= 11 before 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 operator now works (#640).

    Previously the following would error:

    create table operator();
  • squawk_syntax: ast::BinExpr lhs & rhs properties now work correctly (#634).

  • internal: bumped a bunch of outdated JS & Rust dependencies (#630), (#631), (#632), (#633).

More Quick Fixes + Lint Rule & Doc Fixes

25 Aug 02:22
c4d79e3

Choose a tag to compare

Added

  • linter: quick fixes for prefer-text-field (#621), ban-char-field (#620), prefer-bigint-over-int, prefer-bigint-over-small-int (#618), and prefer-timestamptz (#617).

Fixed

Quick Fixes to Ignore Rules

21 Aug 02:32
98fa771

Choose a tag to compare

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

08 Aug 01:43
9408978

Choose a tag to compare

Added

  • linter: add fixes for prefer-robust-stmts (currently LSP server only) (#602)

  • playground: add quick fix support (#606)

Fixed

Fix Invalid Validation for Casts

25 Jul 02:08
fecb7c8

Choose a tag to compare

Fixed

  • parser: bugged warning for invalid casts that was warning about all casts inside function calls. (#598)

Fix VSCode on Windows

24 Jul 00:43
f4da3e9

Choose a tag to compare

Added

  • parser: warn about try_cast and don't fail to parse casts that are invalid. (#593)

Fixed

  • vscode: invalid binary path on windows causing extension not to load. (#595)

GitHub Annotations

12 Jul 19:54
13336d4

Choose a tag to compare

Added

  • GitHub annotations when run with GITHUB_ACTIONS set. (#589), (#590)

    This can be disabled by setting SQUAWK_DISABLE_GITHUB_ANNOTATIONS.

  • Docs for squawk-ignore-file. (#588)

  • Publishing to open vsx in CI. (#587)