55 lines
1.3 KiB
YAML
55 lines
1.3 KiB
YAML
repos:
|
|
# Local hooks using uv-managed tool versions
|
|
- 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-fix
|
|
name: sqlfluff fix
|
|
entry: uv run sqlfluff fix --force --dialect postgres
|
|
language: system
|
|
types: [sql]
|
|
exclude: ^(dbt/target/|dbt/dbt_packages/)
|
|
|
|
- id: sqlfluff-lint
|
|
name: sqlfluff lint
|
|
entry: uv run sqlfluff lint --dialect postgres
|
|
language: system
|
|
types: [sql]
|
|
exclude: ^(dbt/target/|dbt/dbt_packages/)
|
|
|
|
- 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]
|