Switch pre-commit hooks from .githooks to prek#231
Conversation
Replace the manual .githooks/pre-commit script with prek for hook management, matching the pattern used in roborev. The prek hook runs `make fmt lint` which now auto-fixes with `golangci-lint --fix`. - Add prek.toml with local system hook for fmt + lint - Split lint into `lint` (--fix, local dev) and `lint-ci` (CI) - Replace `setup-hooks` with `install-hooks` (prek install) - Update CI workflow to use `make lint-ci` - Remove .githooks/pre-commit (prek manages .git/hooks/ directly) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
roborev: Combined Review (
|
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
roborev: Combined Review (
|
Only unset core.hooksPath when it points to the old .githooks directory. If set to something else, error with guidance instead of silently removing the developer's custom hook configuration. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
roborev: Combined Review (
|
|
I'm fine with leaving things as is. |
Summary
.githooks/pre-commitscript with prek for hook managementmake lintintolint(auto-fix for local dev) andlint-ci(no fix for CI)make install-hooks(requiresbrew install prek)🤖 Generated with Claude Code