Hacker News new | ask | show | jobs
by webmonkeyuk 2509 days ago
Serious question: why would I want to use this instead of tests as part of the CI process? Or would the use case be to use both but just get faster feedback from Lefthook?
1 comments

You should use both. Basically it's bad idea to push broken code to remote, but running tests and linters on all files is too time consuming.

So you set up lefthook to run your tests and liters only on changed files (which is fast and prevents 90% of problems), but then your code is pushed you still run CI checks on all code to make sure that that some dependency in unchanged files is not broken.

> Basically it's bad idea to push broken code to remote

This argument is void if CI is set to allow complete testing on branches along with parallel pipelines. So I want to do something, I branch, code, and push. Server does all the funky stuff without me having to install or understand anything which is huge time saver. With parallel pipelines you do not even block others with this behavior.

Things not on trunk can be broken, that is exactly one of the points we have branches.