> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sqlbuild.com/llms.txt
> Use this file to discover all available pages before exploring further.

# fix

> Apply proven-safe native SQL lint fixes.

# sqb fix

Applies only lint fixes SQLBuild can prove equivalent. Findings that require author intent remain
unchanged and reported.

```bash theme={null}
sqb fix [flags]
```

| Flag             | Description                                     |
| ---------------- | ----------------------------------------------- |
| `--check`        | Report whether fixes are needed without writing |
| `--diff`         | Print the proposed diff without writing         |
| `--json`         | Print structured results                        |
| `--select`, `-s` | Fix selected models                             |
| `--select-file`  | Read selectors from a file                      |
| `--exclude`      | Exclude models from the selected scope          |

```bash theme={null}
sqb fix --diff
sqb fix --check
sqb fix --select path:models/marts
```

Use [`sqb format`](/cli/format) for canonical presentation changes.
