zlacker

[return to "Prek: A better, faster, drop-in pre-commit replacement, engineered in Rust"]
1. dpc_01+fy[view] [source] 2026-02-03 18:42:18
>>fortui+(OP)
BTW. Pre-commit hooks are the wrong way to go about this stuff.

I'm advocating for JJ to build a proper daemon that runs "checks" per change in the background. So you don't run pre-commit checks when committing. They just happen in the background, and when by the time you get to sharing your changes, you get all the things verified for you for each change/commit, effortlessly without you wasting time or needing to do anything special.

I have something a bit like that implemented in SelfCI (a minimalistic local-first Unix-philosophy-abiding CI) https://app.radicle.xyz/nodes/radicle.dpc.pw/rad%3Az2tDzYbAX... and it replaced my use of pre-commit hooks entirely. And users already told me that it does feel like commit hooks done right.

◧◩
2. Cthulh+Xo3[view] [source] 2026-02-04 14:29:11
>>dpc_01+fy
I see it as a layered system, each one slower than the last, but saving time in the long run.

* in-editor, real time linting / formatting / type checking. This handles whatever file you have open at the time.

* pre-commit, do quick checks for all affected code - linting, type checking, formatting, unit tests.

* CI server, async / slow tests. Also does all the above (because pre-commit / pre-push scripts are clientside and cannot be guaranteed to run), plus any slower checks like integration tests.

Basically "shift left", because it takes 100x as long to find and fix a typo (for example) if you find it in production compared to in your editor while writing.

[go to top]