A cheatsheet for various pre-commit hooks and things that help with linting, formatting, code scans and more. These all help “shift left” the review to eliminate more issues in the development workflow, rather than providing feedback only once the CI system is involved.
- GitHub - evilmartians/lefthook: Fast and powerful Git hooks manager for any type of projects. is a newer project based in Go.
- pre-commit is python based, very mature and supported.
A bit more complicated, depending on the Docker image used and the python tooling installed. Assuming you have pip installed, then this should work.
Here’s some examples to get you started.
This is a newer toolkit, but as it’s written in Go and I’m working with Go, this is my current choice.
As long as you have the Go SDK installed, it’s as simple as
Other installation methods are located at the installation guide 1