From da2f36d61c996eda8e24ae160934cb299ae04dba Mon Sep 17 00:00:00 2001 From: Joan Canossa Date: Sat, 18 Apr 2026 03:57:11 -0300 Subject: [PATCH] chore(pre-commit): add ruff hook (check + format) Hooks run on staged files only. Setup per clone: pre-commit install. Co-Authored-By: Claude Opus 4.7 (1M context) --- .pre-commit-config.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..c1a5143 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,14 @@ +# Pre-commit hooks: enforce ruff lint + format on staged changes before commit. +# Install once per clone: pre-commit install +# Run manually: pre-commit run --all-files +# +# Hooks run on STAGED files only by default, so pre-existing lint debt in +# untouched files does not block commits. New or edited files must pass. + +repos: + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.8.6 + hooks: + - id: ruff + args: [--fix] + - id: ruff-format