diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2018-11-22 17:15:46 +0100 |
---|---|---|
committer | Cédric Ollivier <cedric.ollivier@orange.com> | 2019-01-28 10:40:18 +0100 |
commit | f95a5d912eb65c507c1d67981b10c6f5ea790615 (patch) | |
tree | d573b24637f29ea70f841c96eb1f81d5f15572dd /ocata | |
parent | f2138cc59231602b31e60a3b9f39cc59a1860892 (diff) |
Rate python files via pylint
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 <cedric.ollivier@orange.com>
Diffstat (limited to 'ocata')
-rw-r--r-- | ocata/test-requirements.txt | 1 | ||||
-rw-r--r-- | ocata/tox.ini | 13 |
2 files changed, 11 insertions, 3 deletions
diff --git a/ocata/test-requirements.txt b/ocata/test-requirements.txt new file mode 100644 index 00000000..97044b5c --- /dev/null +++ b/ocata/test-requirements.txt @@ -0,0 +1 @@ +pylint # GPLv2 diff --git a/ocata/tox.ini b/ocata/tox.ini index b882540d..79e0a153 100644 --- a/ocata/tox.ini +++ b/ocata/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,8 +27,10 @@ max-complexity = 27 [testenv] setenv = PYTHONPATH = {toxinidir}/../share -deps = -r{toxinidir}/requirements.txt -commands = +deps = + -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt +commands = coverage run --branch manage.py test ocata 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 ocata | tee pylint.out" |