Export the Pylint results via pylint.out
authorCédric Ollivier <cedric.ollivier@orange.com>
Sun, 28 May 2017 08:43:02 +0000 (10:43 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Sun, 28 May 2017 10:45:12 +0000 (12:45 +0200)
It allows integrating Pylint with Jenkins (pylint.out can be defined
as the "XML filename pattern" after installing the Violations plugin
[1]).

It's considered as fine to locally disable warnings such as docstrings
in unit tests. No pylint rcfile is defined for only two options.

Tox still prints the partial results in console to be interpreted by
users. The persistent flag is removed to conform with nosetests args.

[1] https://wiki.jenkins-ci.org/display/JENKINS/Violations

Change-Id: I21662b27c8e4b61e65c4c3f5aab968e3e7dd6d90
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
.gitignore
tox.ini

index 341cf28..f6e4062 100644 (file)
@@ -16,3 +16,4 @@ nosetests.xml
 functest.egg-info
 *venv
 .tox
+*.out
diff --git a/tox.ini b/tox.ini
index bde3a97..e22e148 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -29,8 +29,9 @@ basepython = python2.7
 deps =
   {[testenv]deps}
 whitelist_externals = bash
-commands = bash -c \
-  "pylint --persistent=n functest | sed -ne '/Raw metrics/,//p'"
+commands = bash -c "\
+  pylint -f parseable --disable=locally-disabled functest | \
+  tee pylint.out | sed -ne '/Raw metrics/,//p'"
 
 [testenv:py35]
 dirs =