add check to prevent prints in weboob modules

This commit is contained in:
Romain Bignon 2014-10-06 16:42:56 +02:00
commit be7d49312d
10 changed files with 11 additions and 42 deletions

View file

@ -9,6 +9,8 @@ grep -Fn '__future__ import with_statement' ${PYFILES} && echo 'Error: with_stat
grep -nE '^[[:space:]]+except [[:alnum:] ]+,[[:alnum:] ]+' ${PYFILES} && echo 'Error: use new "as" way of naming exceptions' && exit 7
grep -nE "^ *print " ${PYFILES} && echo 'Error: Use the print function' && exit 8
grep -Fn ".has_key" ${PYFILES} && echo 'Error: Deprecated, use in' && exit 9
MODULE_FILES=$(git ls-files|grep '^modules/.*\.py$'|tr '\n' ' ')
grep -nE "^ *print(\(| )" ${MODULE_FILES} && echo 'Error: Use of print in modules is forbidden, use logger instead' && exit 10
FLAKE8=""
if which flake8 >/dev/null 2>&1; then