zlacker

[parent] [thread] 2 comments
1. nitnel+(OP)[view] [source] 2026-02-03 18:13:48
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.

replies(1): >>sa46+7n
2. sa46+7n[view] [source] 2026-02-03 19:45:35
>>nitnel+(OP)
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.

replies(1): >>chippi+ca1
◧◩
3. chippi+ca1[view] [source] [discussion] 2026-02-03 23:57:12
>>sa46+7n
No one forces you to install the pre-commit hook on your local checkout so what you're suggesting is universally the case. You're perfectly free to just run it manually or let it fail in CI or use `--no-verify` when committing to skip the hook if you install it.
[go to top]