chore(make): auto-install pre-commit hooks on lint#3187
Conversation
Add ensure-hooks target that installs pre-commit hooks if missing, and make lint/lint-all depend on it. Prevents lint failures in fresh clones that skipped `make bootstrap`. Assisted-by: Claude claude-opus-4-6 <noreply@anthropic.com> Signed-off-by: Ralph Bean <rbean@redhat.com>
PR Summary by QodoAuto-install pre-commit hooks on first
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
|
🤖 Finished Review · ✅ Success · Started 10:02 PM UTC · Completed 10:10 PM UTC |
Site previewPreview: https://f7bd90f8-site.fullsend-ai.workers.dev Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Code Review by Qodo
1.
|
ReviewVerdict: Approve A clean, well-scoped chore change. The FindingsLow
Previous runReviewFindingsLow
Labels: PR modifies build system (Makefile) with a chore-type change. |
ifireball
left a comment
There was a problem hiding this comment.
This scares me a bit, I don't particularly like the idea of make test installing stuff into my machine, but I'm willing to try anything once....
Resolve the hardcoded .git/hooks/pre-commit check that breaks in git worktrees (where .git is a file) and when core.hooksPath is configured. Use `git rev-parse --git-path hooks` to find the actual hooks directory. Also skip hook installation in CI (where it's unnecessary) and when core.hooksPath is set (where pre-commit install refuses to run). Assisted-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Bean <rbean@redhat.com>
|
Good catches. I pushed 0b88574 which:
Does that cover it? |
|
🤖 Finished Review · ❌ Failure · Started 10:44 PM UTC · Completed 10:52 PM UTC |
|
🤖 Finished Retro · ✅ Success · Started 2:49 PM UTC · Completed 2:59 PM UTC |
Retro: PR #3187 — chore(make): auto-install pre-commit hooks on lintTimeline
Key FindingsReview quality gap: The review agent approved code with a real correctness bug (hardcoded Second review failure: The re-review run shows ❌ Failure despite producing a valid approve verdict. This is additional evidence for existing issue #3548 (Review workflow shows Failure status despite valid output). Unaddressed finding: The review agent's scope-creep finding suggesting AGENTS.md be updated to mention Proposals filed
|
Summary
ensure-hookstarget that runspre-commit installif.git/hooks/pre-commitis missinglintandlint-alldepend onensure-hooksFresh clones that skip
make bootstrapnow get hooks installed automatically on firstmake lintinstead of silently skipping pre-commit checks and failing in CI.Test plan
make lintin a clone without hooks🤖 Generated with Claude Code