A linter and auto-formatter for SQLFluff, a popular linting tool for SQL and dbt.
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.
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.
By default the linter will lint on the fly but can be changed to linting as you save. Note that linting on save is most useful when auto-save is on.
The linter will work on files with the language mode set to sql
or jinja-sql
. The screen capture below shows you how to switch it.
By default you will be able use SQLFluff fix your file by formatting. Same as calling sqlfluff fix --force --no-safey <path>
The extension is based off of the ruby linter extension.