This is the guide to use the Lefthook git hook manager in any environment. You can find guides for Ruby and Node.js in README.md.
Add Lefthook to your system or build it from source.
go get github.com/Arkweid/lefthookbrew install Arkweid/lefthook/lefthookYou can install lefthook package from AUR
Or take it from binaries and install manually
You can find Python wrapper here package
Create and edit lefthook.yml:
pre-commit:
parallel: true
commands:
audit:
run: brakeman --no-pager
rubocop:
files: git diff --name-only @{push}
glob: "*.rb"
run: rubocop {files}lefthook install && lefthook run pre-commitHave a question? Check the wiki.