weblate/ci/run-lint
Michal Čihař bb72b04bd5 Run pyflakes before pylint (it runs faster)
Signed-off-by: Michal Čihař <michal@cihar.com>
2015-04-17 13:59:08 +02:00

20 lines
506 B
Bash
Executable file
Vendored

#!/bin/sh
log() {
tput setf 6
echo "Running $1..."
tput sgr0
}
# Linter for our code
./scripts/generate-locales
log pep8
pep8 --exclude migrations weblate openshift examples *.py
pep_ret=$?
log pyflakes
pyflakes `find . -name '*.py' -not -name 'settings_test_*.py' -not -name 'settings_test.py' -not -name 'settings_openshift.py' -not -path './data/*'`
pyflakes_ret=$?
log pylint
pylint --rcfile=pylint.rc weblate openshift *.py
pylint_ret=$?
exit $(($pep_ret + $pylint_ret + $pyflakes_ret))