Analyse code when running tox
authorCédric Ollivier <cedric.ollivier@orange.com>
Sun, 21 May 2017 09:50:56 +0000 (11:50 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Sun, 21 May 2017 09:50:56 +0000 (11:50 +0200)
It filters all messages to ease reading the report.

Change-Id: Iab55bc71cb6026edde29fb9f084a07b2dedf564f
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
test-requirements.txt
tox.ini

index b284591..1874bb1 100644 (file)
@@ -9,3 +9,4 @@ coverage==4.1
 mock==1.3.0
 nose==1.3.7
 flake8>=2.5.4,<2.6.0 # MIT
+pylint==1.4.5 # GPLv2
diff --git a/tox.ini b/tox.ini
index 88d720c..db4f892 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
 [tox]
-envlist = pep8,py27
+envlist = pep8,pylint,py27
 
 [testenv]
 deps =
@@ -18,3 +18,11 @@ basepython = python2.7
 deps =
   {[testenv]deps}
 commands = flake8
+
+[testenv:pylint]
+basepython=python2.7
+deps=
+  {[testenv]deps}
+whitelist_externals = bash
+commands=bash -c \
+  "pylint --persistent=n functest | sed -ne '/Raw metrics/,//p'"