An extension to use the sqlfluff linter in vscode.
TypeScript
202
244 commits
updated Aug 13, 2026
Lint and auto-format SQL and dbt code using SQLFluff, a popular SQL linter.

You can run Format Document to fix the linting violations. You cannot run Format Selection. Please note that not all linting violations are automatically fixable.
Hosted VS Code, dbt-core, SQLFluff, and Airflow, find out more at Datacoves.com.
The extension expects sqlfluff to be installed and already added to the path. If it is installed but cannot be found, add the path to your preferences as seen below. Find the path by typing which sqlfluff into your terminal.
Edit your VS Code settings.json file manually or through the user interface.
If you want to manually update the settings.json file, open the VS Code command palette and type in settings.json. Select Preferences: Open Settings. Then, you can add any of the following configuration options to settings.json.
"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,
DBT setup requires these settings to lint and format the document.
"sqlfluff.linter.run": "onSave",
"sqlfluff.experimental.format.executeInTerminal": true,
"editor.formatOnSave": false,
By default you will be able use SQLFluff fix your file by formatting. Same as calling sqlfluff fix <path>

Hovering over a problem with reveal a popup explaining the problem and giving a link to the documentation.
For SQLFluff versions after v2.0.0 this link will take you to the rule documentation.
For SQLFLuff versions before v2.0.0 this link will take you to the top of the documentation page.
The executablePath and config settings can use some VS Code variables.
This is achieved by using the format ${variableName} in the settings.
Here are a few useful ones.
And here are a few that are probably useless.
Open the command palette and run the SQLFluff Debug Extension command
Check the output channel to see the SQLFluff commands this extension is running

If that doesn't help narrow down your problem, you can open an issue at https://github.com/sqlfluff/vscode-sqlfluff/issues
open-vsx.org/extension/sqlfluff/vscode-sqlfluff
The MIT License (MIT). Please see the license file for more information.
31 followers · starred May 2021
35 followers · starred Apr 2023
32 followers · starred Jan 2022
492 followers · starred Mar 2023
TypeScript
100.0%
An extension to use the sqlfluff linter in vscode.
TypeScript
202
244 commits
updated Aug 13, 2026
Lint and auto-format SQL and dbt code using SQLFluff, a popular SQL linter.

You can run Format Document to fix the linting violations. You cannot run Format Selection. Please note that not all linting violations are automatically fixable.
Hosted VS Code, dbt-core, SQLFluff, and Airflow, find out more at Datacoves.com.
The extension expects sqlfluff to be installed and already added to the path. If it is installed but cannot be found, add the path to your preferences as seen below. Find the path by typing which sqlfluff into your terminal.
Edit your VS Code settings.json file manually or through the user interface.
If you want to manually update the settings.json file, open the VS Code command palette and type in settings.json. Select Preferences: Open Settings. Then, you can add any of the following configuration options to settings.json.
"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,
DBT setup requires these settings to lint and format the document.
"sqlfluff.linter.run": "onSave",
"sqlfluff.experimental.format.executeInTerminal": true,
"editor.formatOnSave": false,
By default you will be able use SQLFluff fix your file by formatting. Same as calling sqlfluff fix <path>

Hovering over a problem with reveal a popup explaining the problem and giving a link to the documentation.
For SQLFluff versions after v2.0.0 this link will take you to the rule documentation.
For SQLFLuff versions before v2.0.0 this link will take you to the top of the documentation page.
The executablePath and config settings can use some VS Code variables.
This is achieved by using the format ${variableName} in the settings.
Here are a few useful ones.
And here are a few that are probably useless.
Open the command palette and run the SQLFluff Debug Extension command
Check the output channel to see the SQLFluff commands this extension is running

If that doesn't help narrow down your problem, you can open an issue at https://github.com/sqlfluff/vscode-sqlfluff/issues
open-vsx.org/extension/sqlfluff/vscode-sqlfluff
The MIT License (MIT). Please see the license file for more information.
31 followers · starred May 2021
35 followers · starred Apr 2023
32 followers · starred Jan 2022
492 followers · starred Mar 2023
TypeScript
100.0%