This repository contains custom overcommit hooks which I use in projects.
Within your project if you already not having any custom overcommit hooks you may simply do:
git clone git@github.com:pr0d1r2/overcommit-custom-hooks.git .git-hooks
You may also want to add it to local ignore:
echo .git-hooks/ >> .git/info/exclude
Select configuration you want, add it into your .overcommit.yml
and run overcommit --sign
.
PreCommit:
EnsureNoFocusInSpecs:
enabled: true
include: '**/*_spec.rb'
EnsureNoByebugInFiles:
enabled: true
EnsureNoBindingPryInFiles:
enabled: true
PostCheckout:
SpringStop:
enabled: true
PostMerge:
SpringStop:
enabled: true
PostMerge:
SpringStop:
enabled: true
and/or:
PostCheckout:
SpringStop:
enabled: true
PreCommit:
EnsureNoFocusInSpecs:
enabled: true
include: '**/*_spec.rb'
PreCommit:
EnsureNoByebugInFiles
enabled: true
PreCommit:
EnsureNoBindingPryInFiles
enabled: true