Skip to content

Commit 42019da

Browse files
fix: Address review feedback on pre-commit hooks
- Format hook now runs both ruff check --fix AND ruff format - Lint hook now runs both ruff check AND ruff format --check - Template hook file filter now includes docs/roadmap.md Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 423979c commit 42019da

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,30 @@ repos:
44
- repo: local
55
hooks:
66
# File-aware format hook - only runs on changed Python files
7+
# Runs both ruff check --fix and ruff format
78
- id: format-files
89
name: Format Changed Files
910
stages: [commit]
1011
language: system
1112
types: [python]
12-
entry: uv run ruff check --fix
13+
entry: bash -c 'uv run ruff check --fix "$@" && uv run ruff format "$@"' --
1314
pass_filenames: true
1415

1516
# File-aware lint hook - only runs on changed Python files
17+
# Runs both ruff check and ruff format --check
1618
- id: lint-files
1719
name: Lint Changed Files
1820
stages: [commit]
1921
language: system
2022
types: [python]
21-
entry: uv run ruff check
23+
entry: bash -c 'uv run ruff check "$@" && uv run ruff format --check "$@"' --
2224
pass_filenames: true
2325

24-
# Conditional template hook - only runs when template files change
26+
# Conditional template hook - only runs when template files or roadmap change
2527
- id: template
2628
name: Build Templates
2729
stages: [commit]
2830
language: system
29-
files: ^infra/templates/|\.jinja2$
31+
files: ^infra/templates/|\.jinja2$|^docs/roadmap\.md$
3032
entry: make build-templates
3133
pass_filenames: false

0 commit comments

Comments
 (0)