title | description | layout | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Trunk | How to run SQLFluff |
SQLFluff is a dialect-flexible and configurable SQL linter. |
|
SQLFluff is a linter for SQL.
You can enable the SQLFluff linter with:
trunk check enable sqlfluff
SQLFluff will be auto-enabled if a .sqlfluff
config file is present.
SQLFluff supports the following config files:
.sqlfluff
You can move these files to .trunk/configs
and trunk check
will still find them. See Moving Linters for more info. Trunk Code Quality provides a default .sqlfluff
if your project does not already have one.
Sqlfluff is only configured as a linter by default because its formatting capabilities are limited. To turn sqlfluff formatting on, enable its subcommand:
lint:
enabled:
- sqlfluff@<version>:
commands: [lint, fix]
- SQLFluff site
- SQLFluff Trunk Code Quality integration source
- Trunk Code Quality's open source plugins repo