From f95a5d912eb65c507c1d67981b10c6f5ea790615 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Thu, 22 Nov 2018 17:15:46 +0100 Subject: Rate python files via pylint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It higlights programming errors which are only printed for the time being. It adds pylint in test-requirements.txt as it should have been for coverage, mock, etc. At least all pylint errors should be fixed. Kilo and Newton are out of scope as deprecated. Issue-ID: MULTICLOUD-416 Change-Id: I35f2cfec0327ba163e796b05bdff5edf0246de09 Signed-off-by: Cédric Ollivier --- pike/test-requirements.txt | 1 + pike/tox.ini | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 pike/test-requirements.txt (limited to 'pike') diff --git a/pike/test-requirements.txt b/pike/test-requirements.txt new file mode 100644 index 00000000..97044b5c --- /dev/null +++ b/pike/test-requirements.txt @@ -0,0 +1 @@ +pylint # GPLv2 diff --git a/pike/tox.ini b/pike/tox.ini index cd5327a3..c5e9e5c0 100644 --- a/pike/tox.ini +++ b/pike/tox.ini @@ -13,7 +13,7 @@ # limitations under the License. [tox] -envlist = py27,pep8,cov +envlist = py27,pep8,cov,pylint skipsdist = true [tox:jenkins] @@ -27,7 +27,9 @@ max-complexity = 27 [testenv] setenv = PYTHONPATH = {toxinidir}/../share -deps = -r{toxinidir}/requirements.txt +deps = + -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt commands = coverage run --branch manage.py test pike coverage report --omit="./venv-tox/*,./.tox/*,*tests*,*__init__.py,*newton_base*,*common*" --fail-under=30 @@ -39,3 +41,8 @@ commands=flake8 [testenv:cov] commands = coverage xml --omit="./venv-tox/*,./.tox/*,*tests*,*__init__.py,*newton_base*,*common*, *site-packages*" +[testenv:pylint] +whitelist_externals = bash +commands = + bash -c "\ + pylint -f parseable --reports=y pike | tee pylint.out" -- cgit 1.2.3-korg