-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
33 lines (30 loc) · 1003 Bytes
/
.pre-commit-config.yaml
File metadata and controls
33 lines (30 loc) · 1003 Bytes
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
# This is the preferred pre-commit for my dbt projects, includes a python black formatter if theres python code in a src/** folder
# Sets up some dbt rules for parsing, has descriptions, tables use ref or source.
repos:
- repo: https://github.com/tconbeer/sqlfmt
rev: v0.18.0
hooks:
- id: sqlfmt
language_version: python
additional_dependencies: ['.[jinjafmt]']
- repo: https://github.com/dbt-checkpoint/dbt-checkpoint
rev: v2.0.7
hooks:
- id: dbt-parse
files: ^my_dbt_project/
- id: dbt-docs-generate
args: ["--cmd-flags", "++no-compile"]
files: ^my_dbt_project/
- id: check-script-semicolon
files: ^my_dbt_project/
- id: check-script-has-no-table-name
files: ^my_dbt_project/
files: ^my_dbt_project/models/**
- id: check-model-has-description
files: ^my_dbt_project/models/**
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black
language_version: python3
files: ^src/.*\.py$