sqlfluff / vscode-sqlfluff

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

Error: No such option --FIX-EVEN-UNPARSABLE #107

Open littlemissy07 opened 1 year ago

littlemissy07 commented 1 year ago

Hello! I have added sqlfluff in my vscode but I keep getting this error when I try to format a code: image

This is how my settings.json look like:

{ "workbench.colorTheme": "Default High Contrast", "[python]": { "editor.formatOnType": true },

"sqlfluff.config": "${workspaceFolder}/.sqlfluff",
"sqlfluff.dialect": "mysql",
"sqlfluff.env.environmentVariables": [
  {
    "key": "example_key",
    "value": "example_value"
  }
],
"sqlfluff.env.customDotEnvFiles": [
  "${workspaceFolder}/example.env"
],
"sqlfluff.env.useDotEnvFile": true,
"sqlfluff.excludeRules": ["L009"],
"sqlfluff.executablePath": "sqlfluff",
"sqlfluff.ignoreLocalConfig": false,
"sqlfluff.ignoreParsing": false,
"sqlfluff.rules": [],
"sqlfluff.suppressNotifications": false,
"sqlfluff.workingDirectory": "",
/* Linter */
"sqlfluff.linter.arguments": [],
"sqlfluff.linter.run": "onType",
"sqlfluff.linter.diagnosticSeverity": "error",
"sqlfluff.linter.diagnosticSeverityByRule": [
  {
    "rule": "L010",
    "severity": "warning"
  }
],
"sqlfluff.linter.lintEntireProject": true,
/* Formatter */
"sqlfluff.format.arguments": ["--FIX-EVEN-UNPARSABLE"],
"sqlfluff.format.enabled": true,
"[sql]": {
  "editor.defaultFormatter": "dorzey.vscode-sqlfluff"
},

}

Anything wrong with my set-up? Thank you!

RobertOstermann commented 1 year ago

Hmm, I haven't seen that error before. Your setup looks fine to me on first glance. What sqlfluff (command line) version are you using? What happens when you run sqlfluff fix -h on the command line? Does it show that option?