Skip to content

Migrate from pre-commit to prek#62

Merged
eifinger merged 1 commit intoeifinger:mainfrom
eifinger-bot:feat/migrate-pre-commit-to-prek
Feb 1, 2026
Merged

Migrate from pre-commit to prek#62
eifinger merged 1 commit intoeifinger:mainfrom
eifinger-bot:feat/migrate-pre-commit-to-prek

Conversation

@eifinger-bot
Copy link
Contributor

Summary

Migrate the project from pre-commit to prek - a faster, Rust-based drop-in replacement.

Changes

  • Replace pre-commit and pre-commit-hooks dependencies with prek>=0.3.0
  • Add prek's builtin hooks for common checks (trailing-whitespace, end-of-file-fixer, check-yaml, check-json, check-toml, check-merge-conflict, detect-private-key, check-executables-have-shebangs, check-symlinks)
  • Remove duplicate local hooks that are now covered by builtin
  • Update CI workflow to cache ~/.cache/prek and run rye run prek run --all-files
  • Update actions/cache to v4

Benefits

  • ⚡ Faster hook execution with Rust-native implementations
  • 📦 Single binary without Python runtime dependency
  • 🚀 Automatic fast path for supported hooks
  • 💾 Better performance and disk space usage

Notes

  • This project uses rye instead of uv, so commands use rye run
  • Local hooks kept: codespell, mypy, pytest, yamllint (require their respective packages)
  • Uses prek's builtin hooks for all pre-commit-hooks replacements

- Replace pre-commit with prek in dependencies
- Use prek's builtin hooks for pre-commit-hooks compatibility
- Update CI workflow cache and commands
- Remove duplicate local hooks now covered by builtin

Benefits:
- Faster hook execution with Rust-native implementations
- Single binary without Python runtime dependency
- Automatic fast path for supported hooks
- Better performance and disk space usage
@eifinger eifinger merged commit 9838815 into eifinger:main Feb 1, 2026
3 checks passed
@eifinger eifinger added the dependencies Pull requests that update a dependency file label Feb 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants