Files
data-platform/.pre-commit-config.yaml
2026-03-04 16:54:23 +00:00

48 lines
1.4 KiB
YAML

repos:
# ── Local hooks (use uv-managed tool versions from uv.lock) ──────────────
- repo: local
hooks:
- id: ruff-lint
name: ruff lint
entry: uv run ruff check --fix
language: system
types: [python]
- id: ruff-format
name: ruff format
entry: uv run ruff format
language: system
types: [python]
- id: sqlfluff-lint
name: sqlfluff lint
entry: uv run sqlfluff lint --dialect postgres
language: system
types: [sql]
files: ^(dbt/models/|data_platform/assets/ingestion/)
- id: prettier
name: prettier
entry: npx --yes prettier --write
language: system
types_or: [yaml, markdown]
exclude: |
(?x)^(
dbt/target/|
dbt/dbt_packages/|
\.venv/|
\.pytest_cache/
)
# ── 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]