diff --git a/.gitignore b/.gitignore index e7ea1299a074d23ec23ad85c88c1289b4f7d2df1..7cf3c475128f9335766d26f669da6f15086392de 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,7 @@ virtualenv-[0-9]*[0-9] *.so .asv + +# Files used by run-pylint.sh +.pylintrc.yml +.run-pylint.py diff --git a/run-pylint.sh b/run-pylint.sh new file mode 100755 index 0000000000000000000000000000000000000000..da9c4ad46d33d47a5b69ac31a10a426035d9e01c --- /dev/null +++ b/run-pylint.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +set -o errexit -o nounset + +ci_support="https://gitlab.tiker.net/inducer/ci-support/raw/main" + +if [[ ! -f .pylintrc.yml ]]; then + curl -o .pylintrc.yml "${ci_support}/.pylintrc-default.yml" +fi + + +if [[ ! -f .run-pylint.py ]]; then + curl -L -o .run-pylint.py "${ci_support}/run-pylint.py" +fi + + +PYLINT_RUNNER_ARGS="--jobs=4 --yaml-rcfile=.pylintrc.yml" + +if [[ -f .pylintrc-local.yml ]]; then + PYLINT_RUNNER_ARGS+=" --yaml-rcfile=.pylintrc-local.yml" +fi + +PYTHONWARNINGS=ignore python .run-pylint.py $PYLINT_RUNNER_ARGS $(basename $PWD) test/test_*.py "$@"