Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unable to get pylint output to populate the violations graph

my build steps:

cd $WORKSPACE
export TERM="linux"
. venv/bin/activate
pylint --rcfile=pylint.cfg $(find handlers -maxdepth 1 -name "*.py" -print) > pylint.log || exit 0

result of pylint.log:

************* Module handlers
C:  1, 0: Missing module docstring (missing-docstring)
C:  8, 0: Missing function docstring (missing-docstring)
************* Module handlers.foo
C:  1, 0: Black listed name "foo" (blacklisted-name)
C:  1, 0: Missing module docstring (missing-docstring)
C:  1, 0: Missing function docstring (missing-docstring)
E:  2,11: Undefined variable 'a' (undefined-variable)
E:  2,13: Undefined variable 'b' (undefined-variable)


Report
======
...

(the report continues with statistics by type, raw metrics, external dependencies)

the xml filename pattern for pylint is:

**/pylint.log

with the source path pattern being:

**/

Even after all this, and with pylint.log showing I have lint errors, the graph shows nothing.

any ideas how to get pylint and the violations plugin working nicely together?

like image 336
tipu Avatar asked Jun 11 '15 19:06

tipu


1 Answers

it seems the correct pylint command is the following:

pylint --rcfile=pylint.cfg $(find handlers -maxdepth 1 -name "*.py" -print)  --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" > pylint.log || exit 0

note the addition of the --msg-template param

like image 176
tipu Avatar answered Nov 15 '22 10:11

tipu