From 40f255a466c3a11f3b7572724c24ab5d870755ce Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Sun, 28 May 2017 10:43:02 +0200 Subject: Export the Pylint results via pylint.out MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .gitignore | 1 + tox.ini | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 341cf2811..f6e406203 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ nosetests.xml functest.egg-info *venv .tox +*.out diff --git a/tox.ini b/tox.ini index bde3a9757..e22e1489e 100644 --- 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 = -- cgit 1.2.3-korg