sqlfluff/vscode-sqlfluff

vscode format on save errors due to future deprecation

vincentchangsnt opened this issue · 0 comments

Hi I'm having an issue getting sqlfluff for format my code on save. I am on the latest python (3.12.2), sqlfluff (2.3.5), and sqlfluff-templater-dbt (2.3.5).

My settings.json

{
    "sqlfluff.config": "/Users/vincent/code_base/snt_dbt/.sqlfluff",
    "sqlfluff.dialect": "bigquery",
    "sqlfluff.workingDirectory": "/Users/vincent/code_base/snt_dbt",

    /* Linter */
    "sqlfluff.linter.diagnosticSeverity": "error",
    "sqlfluff.linter.lintEntireProject": true,
    /* Formatter */
    "sqlfluff.format.arguments": ["--FIX-EVEN-UNPARSABLE"],
    "sqlfluff.format.enabled": true,

    "sqlfluff.linter.run": "onSave",
    "sqlfluff.experimental.format.executeInTerminal": true,
    "editor.formatOnSave": false,
    "editor.defaultFormatter": "dorzey.vscode-sqlfluff"
}

If I run sqlfluff fix [something] it works, but it shows
Screenshot 2024-02-21 at 4 31 49 PM

When I try to run format on save I get the same error but instead it will error out.
Screenshot 2024-02-21 at 4 33 17 PM

And running the sqlfluff debugger yields this:
Screenshot 2024-02-21 at 4 34 08 PM

Can someone help? I don't understand why my working directory is invalid or why it's erroring out due to these future deprecation warnings.