forked from cal-itp/data-infra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
38 lines (38 loc) · 1.43 KB
/
.pre-commit-config.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
27
28
29
30
31
32
33
34
35
36
37
38
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.4.0
hooks:
- id: flake8
args: ["--ignore=E501,W503"] # line too long and line before binary operator (black is ok with these)
types:
- python
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: ["--unsafe"]
exclude: 'kubernetes/apps/charts/.*'
- id: check-added-large-files
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/pycqa/bandit
rev: 1.7.0
hooks:
- id: bandit
args: ["-ll", "--skip=B108,B608,B310,B303"]
files: .py$
- repo: https://github.com/sqlfluff/sqlfluff
rev: 0.12.0
hooks:
- id: sqlfluff-lint
additional_dependencies: ['dbt-bigquery', 'sqlfluff-templater-dbt']
# skip: parsing, templating that are unfixable by linter
# skip: line too long, keywords should not be used as identifier (at least for now...)
# skip: unqualified reference from multiple tables
# skip: found using expected only on
# skip: column order -- messed up union operation
# skip: joins should not include subqueries -- TODO
# skip: use left join instead of right join -- TODO
args: [--dialect, "bigquery", --ignore, "parsing,templating",--exclude-rules, "L016,L029,L027,L032,L034,L014,L042,L055"]
files: "warehouse/"