-
Notifications
You must be signed in to change notification settings - Fork 4
/
.pre-commit-config.yaml
41 lines (41 loc) · 1.2 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
# All available hooks: https://pre-commit.com/hooks.html
repos:
- repo: https://github.com/sqlfluff/sqlfluff
rev: 3.1.0
hooks:
- id: sqlfluff-lint
- id: sqlfluff-fix
- repo: https://github.com/tconbeer/sqlfmt
rev: v0.19.2
hooks:
- id: sqlfmt
entry: >-
sqlfmt -v dbt
--exclude dbt/venv/**/*
--exclude dbt/.venv/**/*
--exclude dbt/models/**/*
--exclude dbt/target/**/*
--exclude dbt/dbt_packages/**/*
--exclude dbt/dbt_modules/**/*
files: ^dbt/
language_version: python
additional_dependencies: ['.[jinjafmt]']
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.5
hooks:
# Python linter. Ruff recommends running this before the formatter to
# avoid conflicts when using the --fix flag
- id: ruff
args:
- --fix
# Formatter
- id: ruff-format
- repo: local
hooks:
- id: check-sort-dbt-yaml-files
name: check-sort-dbt-yaml-files
entry: python3 dbt/scripts/check_sort_dbt_yaml_files.py
language: system
types_or: [yaml, markdown]
files: ^dbt/
exclude: venv/