Switch git hooks from pre-commit to prek #276

Merged
eblume merged 1 commit from feature/switch-to-prek into main 2026-03-02 18:15:24 -08:00
Owner

Summary

  • Replace pre-commit with prek, a faster Rust-native drop-in alternative
  • Migrate config from .pre-commit-config.yaml (YAML) to prek.toml (TOML)
  • Add new built-in checks: case conflicts, private key detection, executable shebangs
  • Install prek via mise native registry (aqua:j178/prek) instead of pipx
  • Update all doc references across README, contributing guide, and how-to docs

Notes

  • check-yaml still uses the remote pre-commit-hooks repo because prek's builtin fast path doesn't support --unsafe yet (needed for Ansible custom YAML tags)
  • All existing custom hooks (docs validation, container version check, mikado invariant, workflow validation) work unchanged
  • Tested: all hooks pass on clean tree, deliberate doc link breakage is caught

Test plan

  • prek run --all-files passes all checks
  • Broken wiki-link correctly caught by docs-check-links
  • taplo-format auto-fixes TOML formatting on commit
  • commit-msg hook (mikado invariant) fires correctly
## Summary - Replace pre-commit with [prek](https://github.com/j178/prek), a faster Rust-native drop-in alternative - Migrate config from `.pre-commit-config.yaml` (YAML) to `prek.toml` (TOML) - Add new built-in checks: case conflicts, private key detection, executable shebangs - Install prek via mise native registry (`aqua:j178/prek`) instead of pipx - Update all doc references across README, contributing guide, and how-to docs ## Notes - `check-yaml` still uses the remote `pre-commit-hooks` repo because prek's builtin fast path doesn't support `--unsafe` yet (needed for Ansible custom YAML tags) - All existing custom hooks (docs validation, container version check, mikado invariant, workflow validation) work unchanged - Tested: all hooks pass on clean tree, deliberate doc link breakage is caught ## Test plan - [x] `prek run --all-files` passes all checks - [x] Broken wiki-link correctly caught by `docs-check-links` - [x] taplo-format auto-fixes TOML formatting on commit - [x] commit-msg hook (mikado invariant) fires correctly
prek is a faster, Rust-native drop-in replacement for pre-commit.
Migrates config from .pre-commit-config.yaml to prek.toml, adds
built-in checks for case conflicts, private key detection, and
executable shebangs. Updates all doc references.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
eblume merged commit 7a1875936c into main 2026-03-02 18:15:24 -08:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
eblume/blumeops!276
No description provided.