forked from sqlfluff/sqlfluff
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-hooks.yaml
26 lines (25 loc) · 1002 Bytes
/
.pre-commit-hooks.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
- id: sqlfluff-lint
name: sqlfluff-lint
# Set `--processes 0` to use maximum parallelism
# - `--disable-progress-bar` pre-commit suppresses logging already
# this can cause an unneeded slow down.
entry: sqlfluff lint --processes 0 --disable-progress-bar
language: python
description: "Lints sql files with `SQLFluff`"
types: [sql]
require_serial: true
additional_dependencies: []
- id: sqlfluff-fix
name: sqlfluff-fix
# Set a couple of default flags:
# - `--show-lint-violations` shows issues to not require running `sqlfluff lint`
# - `--processes 0` to use maximum parallelism
# - `--disable-progress-bar` pre-commit suppresses logging already
# this can cause an unneeded slow down.
# By default, this hook applies all rules.
entry: sqlfluff fix --show-lint-violations --processes 0 --disable-progress-bar
language: python
description: "Fixes sql lint errors with `SQLFluff`"
types: [sql]
require_serial: true
additional_dependencies: []