Created
February 4, 2015 02:18
-
-
Save arthuralvim/871e6764e6aa14d79d32 to your computer and use it in GitHub Desktop.
Git pre-commit hook to check if there's any debugger breakpoint inside your python files.
This file contains 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 | |
pdb_check=$(git grep pdb -- '*.py') | |
if [ ${#pdb_check} -gt 0 ] | |
then | |
echo "COMMIT REJECTED: commit contains code with break points. Please remove before commiting." | |
echo $pdb_check | |
exit 1 | |
else | |
echo "Code contains no break points" | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment