VSCode Extension shows errors ignored by the config file.

Open
#679 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
postgresql, rust, vscode

Research direction

Start by reproducing the issue with the shown .squawk.toml and a migration in the VSCode language server, then trace how excluded_rules are loaded and applied. Done means the excluded require-timeout-settings diagnostic is absent while ban-drop-column remains visible.

Written by the indexing model from the issue text.

Description

bug

squawk-vscode version: 2.28.1
I have a .squawk.toml at the top level of our repository:

assume_in_transaction = true
pg_version = "15"

excluded_paths = [
    "migrations/0000_00_00_initial.sql"
]

excluded_rules = [
    "require-timeout-settings",
    "prefer-timestamptz",
    "prefer-robust-stmts",
    "require-concurrent-index-creation",
    "require-concurrent-index-deletion",
]

The Squawk language server output starts with:

21:31:05 [INFO] using config file path: /Users/dreid/src/repo/.squawk.toml
21:31:05 [INFO] pg version: Some(Version { major: 15, minor: None, patch: None })
21:31:05 [INFO] excluded rules: [RequireTimeoutSettings, PreferTimestampTz, PreferRobustStmts, RequireConcurrentIndexCreation, RequireConcurrentIndexDeletion]
21:31:05 [INFO] excluded paths: ["migrations/0000_00_00_initial.sql"]
21:31:05 [INFO] assume in a transaction: true
21:31:05 [INFO] no error on unmatched pattern: false
21:31:05 [INFO] Starting Squawk LSP server

Meanwhile a new migration displays:

Image

I would expect to only see the ban-drop-column issue and not the require-timeout-settings issue that is part of the excluded_rules in the config file.

Dominant language
Rust
Stars
1.2k
Forks
70
Avg merge
52m
Merged PRs (30d)
47

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sbdchd/squawk

All issues in sbdchd/squawk

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.