commit: 03821d46e232d9823123fb1603154523798efaa0 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> AuthorDate: Mon Jun 6 15:29:06 2022 +0000 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> CommitDate: Mon Jun 6 15:31:33 2022 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=03821d46
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 <AT> gentoo.org> run-pylint | 2 ++ tox.ini | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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