-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
110 lines (95 loc) · 3.35 KB
/
.pre-commit-config.yaml
File metadata and controls
110 lines (95 loc) · 3.35 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: end-of-file-fixer # Ensures that a file is either empty, or ends with one newline.
- id: check-ast # Simply check whether the files parse as valid python
- id: check-toml # This hook checks toml files for parseable syntax.
- id: check-yaml # This hook checks yaml files for parseable syntax.
exclude: ^(cli/resources/templates)/
- id: check-added-large-files # Prevent giant files from being committed (500kB)
- id: check-merge-conflict # Check for files that contain merge conflict strings.
- id: detect-private-key # Detects the presence of private keys
# - repo: https://github.com/sqlfluff/sqlfluff
# rev: 3.3.1
# hooks:
# - id: sqlfluff-lint
# name: SQLFluff Lint
# files: ^models/|^analysis/|^tests/
# entry: sqlfluff lint
# language: python
# require_serial: true
# types: [sql]
# additional_dependencies: ['sqlfluff-templater-dbt', 'dbt-bigquery']
# args: [
# '--dialect', 'bigquery',
# '--templater', 'dbt',
# '--rules', 'L001,L002,L003,L004,L005,L006,L007,L008,L009,L010,L011,L012,L013,L014,L015,L016,L017,L018,L019,L020'
# ]
# - id: sqlfluff-fix
# name: SQLFluff Fix
# files: ^models/|^analysis/|^tests/
# entry: sqlfluff fix
# language: python
# require_serial: true
# types: [sql]
# additional_dependencies: ['sqlfluff-templater-dbt', 'dbt-bigquery']
# args: [
# '--dialect', 'bigquery',
# '--templater', 'dbt',
# '--rules', 'L001,L002,L003,L004,L005,L006,L007,L008,L009,L010,L011,L012,L013,L014,L015,L016,L017,L018,L019,L020'
# ]
- repo: https://github.com/PyCQA/isort
rev: 6.0.1
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
- repo: https://github.com/psf/black
rev: 25.1.0
hooks:
- id: black
language_version: python3
args: [--line-length=150]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.15.0
hooks:
- id: mypy
args: ["--no-namespace-packages","--ignore-missing-imports",]
additional_dependencies: ["types-PyYAML"]
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.11.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/dbt-checkpoint/dbt-checkpoint
rev: v2.0.6
hooks:
- id: check-script-semicolon
- id: dbt-parse
files: ^models/|^analysis/|^macros/|^tests/
stages: [pre-push]
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.22.0
hooks:
- id: commitlint
stages: [commit-msg]
language: node
entry: commitlint --edit
pass_filenames: false
always_run: true
# - repo: local
# hooks:
# - id: run-sast
# name: run-sast
# entry: bearer scan .
# language: system
# stages: [pre-push]
# pass_filenames: false
# exclude: ^(cli/resources/templates)/
# - id: cli-validate
# name: cli validate
# entry: cli_validate
# description: This hook runs cli validate
# language: python
# files: ^(models)\/.+\.(yml|yaml|sql)$
# # stages: [pre-push]