Skip to content

⬆️ Replace pre-commit with prek for hook management#28

Merged
tsvikas merged 4 commits into
mainfrom
feat/prek
May 14, 2026
Merged

⬆️ Replace pre-commit with prek for hook management#28
tsvikas merged 4 commits into
mainfrom
feat/prek

Conversation

@tsvikas
Copy link
Copy Markdown
Owner

@tsvikas tsvikas commented Apr 27, 2026

Summary

  • Swap pre-commit for prek, a Rust-based drop-in replacement, in dev deps and all just recipes.
  • Use the canonical prek auto-update (hyphenated) command name; the old autoupdate alias still works but new flags (--cooldown-days, --check) are documented only on the hyphenated form.
  • Replace pre-commit/action with j178/prek-action@v2 (SHA-pinned) in CI.
  • Drop the -j flag and the appears to be a mutable reference grep filter from deps-update: prek defaults --jobs to 0 (auto-detect cpu count) and does not emit the pre-commit-only warning the filter targeted.

Test plan

  • just deps-update succeeds and updates the rendered .pre-commit-config.yaml
  • just lint passes locally with prek run --all-files
  • CI prek job runs prek run --all-files and passes
  • Initialize a fresh project from the template with just init and confirm prek install --install-hooks runs

🤖 Generated with Claude Code

tsvikas and others added 4 commits April 27, 2026 23:58
Update the project to use prek instead of pre-commit for managing
git hooks. Prek is a faster Rust-based alternative to pre-commit
that maintains compatibility with the same hook ecosystem.
Prek's docs use the hyphenated form; the unhyphenated `autoupdate`
remains accepted for pre-commit compatibility but the new flags
(`--cooldown-days`, `--check`) are documented only on `auto-update`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The native prek action runs `prek run --all-files` directly, avoiding
the pre-commit/action wrapper now that the project has migrated to prek.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`-j` defaults to `0` in prek (auto-detect cpu count) so it can be
omitted. The `mutable reference` grep filter targeted a pre-commit-only
warning that prek does not emit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@tsvikas tsvikas merged commit e397011 into main May 14, 2026
5 checks passed
@tsvikas tsvikas deleted the feat/prek branch May 14, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant