|
|
|
@ -25,11 +25,11 @@ if [ -z "$(find -L "${1:-.}" -maxdepth 2 -type f -iname '*.py' -o -iname '*.jy')
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
section "Python - finding any instances of calling quit() in code which are probably typos for custom qquit()"
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
|
|
for x in $(find -L "${1:-.}" -maxdepth 2 -type f -iname '*.py' -o -iname '*.jy'); do
|
|
|
|
|
type isExcluded &>/dev/null && isExcluded "$x" && continue
|
|
|
|
|
egrep '^[^#]*\bquit' "$x" &&
|
|
|
|
|
type isExcluded &>/dev/null && isExcluded "$x" && echo -n '-' && continue
|
|
|
|
|
echo -n '.'
|
|
|
|
|
egrep '^[^#]*\bquit\b' "$x" &&
|
|
|
|
|
{ echo "ERROR: $x contains quit() call!! Typo?"; exit 1; }
|
|
|
|
|
done
|
|
|
|
|
section "Python - passed - no quit() calls found"
|
|
|
|
|