Files
data-platform/.pre-commit-config.yaml
2026-03-03 22:02:25 +00:00

44 lines
1.7 KiB
YAML

repos:
# ── Python: ruff (lint + format) ─────────────────────────────────────────
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.9
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
# ── YAML / JSON / Markdown: prettier ─────────────────────────────────────
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
types_or: [yaml, json, markdown]
exclude: |
(?x)^(
dbt/target/|
dbt/dbt_packages/|
\.venv/
)
# ── SQL: sqlfluff ─────────────────────────────────────────────────────────
- repo: https://github.com/sqlfluff/sqlfluff
rev: 3.4.0
hooks:
- id: sqlfluff-lint
additional_dependencies: [sqlfluff-templater-dbt, dbt-core, dbt-postgres]
- id: sqlfluff-fix
additional_dependencies: [sqlfluff-templater-dbt, dbt-core, dbt-postgres]
stages: [manual] # only run sqlfluff-fix manually (make lint-fix)
# ── General hygiene ───────────────────────────────────────────────────────
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-json
- id: check-merge-conflict
- id: mixed-line-ending
args: [--fix=lf]