this-pylint is a script that runs pylint twice (by default) or once. The goal is fourfold:
Inspect code on both 2.x and 3.x, or optionally just 2.x or just 3.x.
Ignore user-specified messages described on the command line, for when pylint doesn't appear to have a way
of ignoring them with "pylint: disable=whatever" comments.
Return a false exit code to the calling process only if something relevant-looking is output by pylint.
Only produce a (brief) report if something relevant-looking is found.
Usage: ./this-pylint
--ignore-message re1 --ignore-message re2
--verbose
--which-2 /usr/local/cpython-2.7/bin/pylint
--which-3 /usr/local/cpython-3.4/bin/pylint
--to-pylint args
--which-2 and --which-3 must specify the path to a pylint for python
2.x or 3.x respectively. They can also be specified as "None" to skip
checking 2.x or 3.x. Naturally, if you skip both, no checks are run.
Example use:
./this-pylint \
--ignore-message "^.*Unable to import 'hashlib'" \
--ignore-message "^.*Module 'hashlib' has no 'md5' member" \
--to-pylint filetocheck1.py filetocheck2.py
Bugs:
If duplicate code is found, the filename reported is bogus.