weblate/ci/run-lint
Michal Čihař 5b577564a3 Fix lint configuration to ignore dev settings
Signed-off-by: Michal Čihař <michal@cihar.com>
2018-06-26 21:23:59 +02:00

20 lines
610 B
Bash
Executable file
Vendored

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