SQLFluff

SQLFluff is a linter for SQL.

You can enable the SQLFluff linter with:

trunk check enable sqlfluff

Auto Enabling

SQLFluff will be auto-enabled if a .sqlfluff config file is present.

Settings

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.

Usage Notes

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]

Last updated