# sql/sqlfluff

> Lints every SQL file for layout, capitalization, aliasing, and ambiguous references, in the dialect the database configuration names.

Lints every SQL file for layout, capitalization, aliasing, and ambiguous references, in the dialect the database configuration names.

Part of the [`sql`](/reference/configurations/sql/) configuration, at the `recommended` [level](/start/concepts/#levels). It runs at the `commit` [stage](/start/concepts/#stage), per file. It runs sqlfluff. `gspot check --fix` fixes what it can.

## Why

When every SQL file follows one style, a reviewer can focus on what each statement does.

## What to do

Run `gspot check --fix`. Turn one rule off with `gspot ignore sql/sqlfluff --rule <code> --reason "<why>"`.

## Example

The query `select id from user_accounts;` reports CP01 for lowercase keywords. Write it as `SELECT id FROM user_accounts;`.

## Turn it off

Turn it off for some files, or one of its lint rules, with a reason:

```shell
gspot ignore sql/sqlfluff --paths "<glob>" --reason "<why>"
gspot ignore sql/sqlfluff --rule <rule> --reason "<why>"
```

To silence one place, write a comment such as:

```text
SELECT * FROM orders -- noqa: AM04 -- the view mirrors every column
```
