Created
November 11, 2012 14:58
-
-
Save saulius/4055140 to your computer and use it in GitHub Desktop.
pre-commit for present development artefacts on Rails project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
fail_words=("debugger" "console.log" "puts" "binding.pry" "focus: true" ":focus") | |
for fail_word in "${fail_words[@]}" | |
do | |
grep -q "$fail_word" <(git diff --cached) && echo "Fail word found: '$fail_word'" && exit 1 | |
done | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment