zlacker

[return to "Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust"]
1. xyzzy_+Hn[view] [source] 2026-02-03 18:03:30
>>fortui+(OP)
Another commenter is currently down voted for something similar, but I'll share my controversial take anyways: I hate pre-commit hooks.

I loathe UX flows where you get turned around. If I try to make a commit, it's because that I what I intend to do. I don't want to receive surprise errors. It's just more magic, more implicit behavior. Give me explicit tooling.

If you want to use pre-commit hooks, great! You do you. But don't force them on me, as so many projects do these days.

◧◩
2. nitnel+yq[view] [source] 2026-02-03 18:13:48
>>xyzzy_+Hn
Client-side pre-commit hooks are there to help you in the same way that type checking (or a powerful compiler) is there to help you avoid bugs. In particular with git, you can skip the hooks when committing.

Now, if the server enforces checks on push, that's a project policy that should be respected.

◧◩◪
3. sa46+FN[view] [source] 2026-02-03 19:45:35
>>nitnel+yq
The problem is that pre-commit hooks are much slower with a much higher false-positive rate than type checking.

Pre-commit checks should be opt-in with CI as the gate. It's useful to be able to commit code in a failing state.

[go to top]