From b4bc1a5f913967ee9795f5071818558af8b4dc2f Mon Sep 17 00:00:00 2001 From: Matthias Diener <mdiener@illinois.edu> Date: Sat, 4 Sep 2021 18:32:07 -0500 Subject: [PATCH] add run-pylint --- .gitignore | 4 ++++ run-pylint.sh | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100755 run-pylint.sh diff --git a/.gitignore b/.gitignore index 8e4ee63..4553602 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,7 @@ doc/_build *.dot *.svg + +# pylint stuff +.pylintrc.yml +.run-pylint.py diff --git a/run-pylint.sh b/run-pylint.sh new file mode 100755 index 0000000..6c73866 --- /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 + +python .run-pylint.py $PYLINT_RUNNER_ARGS $(basename $PWD) test/test_*.py examples "$@" -- GitLab