aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2022-06-06 11:29:06 -0400
committerMike Gilbert <floppym@gentoo.org>2022-06-06 11:31:33 -0400
commit03821d46e232d9823123fb1603154523798efaa0 (patch)
tree062705f1de6b757b2426fcf78ae3ce2bba3777db
parentManifest: Fix ("size",) tuple (diff)
downloadportage-03821d46e232d9823123fb1603154523798efaa0.tar.gz
portage-03821d46e232d9823123fb1603154523798efaa0.tar.bz2
portage-03821d46e232d9823123fb1603154523798efaa0.zip
Add script to call pylint on all python files
This gives us a simple way to call pylint from tox.ini. Our previous hack would call pylint on non-python files (shell scripts), and only went unnoticed because we have most errors disabled in pylintrc. Signed-off-by: Mike Gilbert <floppym@gentoo.org>
-rwxr-xr-xrun-pylint2
-rw-r--r--tox.ini2
2 files changed, 3 insertions, 1 deletions
diff --git a/run-pylint b/run-pylint
new file mode 100755
index 000000000..79b0b30b1
--- /dev/null
+++ b/run-pylint
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec pylint "$@" lib/_emerge lib/portage $(grep -Rl '^#!.*python' bin)
diff --git a/tox.ini b/tox.ini
index e18a5de29..ad076f739 100644
--- a/tox.ini
+++ b/tox.ini
@@ -19,5 +19,5 @@ deps =
setenv =
PYTHONPATH={toxinidir}/lib
commands =
- pylint: bash -c 'rm -rf build && PYTHONPATH=$PWD/lib pylint bin/* lib/*'
+ pylint: ./run-pylint
python -b -Wd setup.py test