1 |
commit: 03821d46e232d9823123fb1603154523798efaa0 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jun 6 15:29:06 2022 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 6 15:31:33 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=03821d46 |
7 |
|
8 |
Add script to call pylint on all python files |
9 |
|
10 |
This gives us a simple way to call pylint from tox.ini. |
11 |
|
12 |
Our previous hack would call pylint on non-python files (shell scripts), |
13 |
and only went unnoticed because we have most errors disabled in |
14 |
pylintrc. |
15 |
|
16 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
17 |
|
18 |
run-pylint | 2 ++ |
19 |
tox.ini | 2 +- |
20 |
2 files changed, 3 insertions(+), 1 deletion(-) |
21 |
|
22 |
diff --git a/run-pylint b/run-pylint |
23 |
new file mode 100755 |
24 |
index 000000000..79b0b30b1 |
25 |
--- /dev/null |
26 |
+++ b/run-pylint |
27 |
@@ -0,0 +1,2 @@ |
28 |
+#!/bin/sh |
29 |
+exec pylint "$@" lib/_emerge lib/portage $(grep -Rl '^#!.*python' bin) |
30 |
|
31 |
diff --git a/tox.ini b/tox.ini |
32 |
index e18a5de29..ad076f739 100644 |
33 |
--- a/tox.ini |
34 |
+++ b/tox.ini |
35 |
@@ -19,5 +19,5 @@ deps = |
36 |
setenv = |
37 |
PYTHONPATH={toxinidir}/lib |
38 |
commands = |
39 |
- pylint: bash -c 'rm -rf build && PYTHONPATH=$PWD/lib pylint bin/* lib/*' |
40 |
+ pylint: ./run-pylint |
41 |
python -b -Wd setup.py test |