sqlfluff / vscode-sqlfluff

An extension to use the sqlfluff linter in vscode.
https://marketplace.visualstudio.com/items?itemName=dorzey.vscode-sqlfluff
MIT License
156 stars 33 forks source link

VS code SQL editor marks problems but running SQLFluff via terminal doesn't detect problems #124

Open keen85 opened 9 months ago

keen85 commented 9 months ago

Hi, I have the situation where there are SQLFluff problem marked in the editor window but which do not correspond to the results when executing SQLFluff from terminal. I also enabled SQLFluff Show Output Channel and weirdly this seems correct (corresponding to terminal) but differs from the editor window.

image

When running SQLFluff Debug Extension no failed tests are listed.

sql code

CREATE TABLE [dbo].[test_table]
(
    [id] [BIGINT] NULL
    , [payload] [NVARCHAR](32) NULL
)
WITH
(
    DISTRIBUTION = ROUND_ROBIN
    , CLUSTERED COLUMNSTORE INDEX
);

settings.json

{
    "sqlfluff.executablePath": "../../.venv/Scripts/sqlfluff.exe",
    "sqlfluff.config": "${workspaceFolder}/.sqlfluff",
    "sqlfluff.format.enabled": true,
    "editor.formatOnSave": true,
}