Skip to content

Commit

Permalink
add run-pylint script
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasdiener authored and inducer committed Feb 10, 2022
1 parent f3d986b commit 2c14ece
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ run-debug-*
.pytest_cache

*.json

# pylint stuff
.pylintrc.yml
.run-pylint.py
23 changes: 23 additions & 0 deletions run-pylint.sh
Original file line number Diff line number Diff line change
@@ -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/*.py $(find examples -name '*.py') "$@"

0 comments on commit 2c14ece

Please sign in to comment.