-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
58 lines (53 loc) · 1.79 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
repos:
- repo: https://github.com/dbt-checkpoint/dbt-checkpoint
rev: v1.2.1
hooks:
- id: dbt-docs-generate
- id: check-script-semicolon
files: ^models
- id: check-model-has-properties-file
files: ^models
exclude: ^custom_tests
- id: check-script-has-no-table-name
files: ^models
- id: generate-model-properties-file
args: ["--properties-file", "./models/mesa/{name}.yml", "--"]
#- id: unify-column-description
- id: check-column-name-contract
args: [--pattern, "(is|has|do)_.*", --dtype, boolean]
- id: check-model-has-all-columns
name: Check columns - marts
files: ^models/mesa/marts
- id: check-model-has-tests
files: ^models/mesa/marts
args: ["--test-cnt", "1", "--"]
- id: check-model-columns-have-desc
files: ^models/mesa/marts
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: end-of-file-fixer
exclude: ^.bumpversion.cfg
- id: trailing-whitespace
exclude: ^.bumpversion.cfg
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.3"
hooks:
- id: prettier
#- repo: https://github.com/tconbeer/sqlfmt
# rev: v0.21.0
# hooks:
# - id: sqlfmt
# language_version: python
# additional_dependencies: [".[jinjafmt]"]
- repo: https://github.com/sqlfluff/sqlfluff
rev: 2.3.5
hooks:
#- id: sqlfluff-lint
# args: ["--dialect", "snowflake"]
# log_file: "true"
# additional_dependencies: ["dbt-snowflake", "sqlfluff-templater-dbt"]
- id: sqlfluff-fix
args: ["--dialect", "snowflake", "--config", ".sqlfluff"]
#log_file: true
additional_dependencies: ["dbt-snowflake", "sqlfluff-templater-dbt"]