Djangonaute cheminot-entrepreneur-rôliste sous licence GPL.
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
# make sure there's no TODO, debugging... left | |
errors=0 | |
for bad in 'import pdb' 'import ipdb' 'TODO' 'print' 'assert False'; do | |
echo ">> checking for '$bad'" | |
res=$(git diff-index --name-only --cached $against -S"$bad" --) | |
if test -n "$res"; then # if not empty, found some guilty files | |
echo "ERROR, found '$bad' in files commited:" | |
echo $res | |
errors=$(($errors + 1)) | |
fi |
Source: article from The Guardian
from itertools import permutations
NewerOlder