-
-
Save MethodGrab/f9752318466d2fff929a156003040e48 to your computer and use it in GitHub Desktop.
git: pre-commit hook script to prevent committing FIXME code
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/sh | |
matches=$(git diff --cached | grep -E '\+.*?FIXME') | |
if [ "$matches" != "" ] | |
then | |
echo "'FIXME' tag is detected." | |
echo "Please fix it before committing." | |
echo " ${matches}" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment