Enable pylint for nfv as a gating job for stx-nfv
This invokes pylint on all the nfv code. The pylint.rc file currently suppresses failing lint tests. In later submissions those suppressed types will be enabled and their code fixed. Story: 2003499 TaskId: 24944 Change-Id: I4726927a9e5e76a242dec3f7b25f51b2887e505e Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
This commit is contained in:
parent
483cf84c0b
commit
b472324664
10
.zuul.yaml
10
.zuul.yaml
|
@ -6,7 +6,17 @@
|
|||
- openstack-tox-pep8
|
||||
- openstack-tox-py27:
|
||||
voting: false
|
||||
- nfv-tox-pylint
|
||||
gate:
|
||||
jobs:
|
||||
- openstack-tox-linters
|
||||
- openstack-tox-pep8
|
||||
|
||||
- job:
|
||||
name: nfv-tox-pylint
|
||||
parent: tox
|
||||
description: Run pylint for nfv
|
||||
required-projects:
|
||||
- openstack/stx-fault
|
||||
vars:
|
||||
tox_envlist: pylint
|
||||
|
|
|
@ -26,14 +26,30 @@ load-plugins=
|
|||
# can either give multiple identifier separated by comma (,) or put this option
|
||||
# multiple time (only on the command line, not in the configuration file where
|
||||
# it should appear only once).
|
||||
# W0102 dangerous-default-value
|
||||
# W0107 unnecessary-pass
|
||||
# W0120 useless-else-on-loop
|
||||
# W0125 using-constant-test
|
||||
# W0212 protected-access var starting with _ used outside class or descendant
|
||||
# W0221 arguments-differ
|
||||
# W0223 abstract-method
|
||||
# W0231 super-init-not-called
|
||||
# W0235 useless-super-delegation
|
||||
# W0311 bad-indentation
|
||||
# W0401 wildcard-import
|
||||
# W0403 relative-import warning
|
||||
# W0404 reimported
|
||||
# W0511 fixme
|
||||
# W0603 Using the global statement warning
|
||||
# W0612 Unused variable warning
|
||||
# W0613 Unused argument warning
|
||||
# W0621 redefined-outer-name
|
||||
# W0631 undefined-loop-variable
|
||||
# W0622 redefined-builtin
|
||||
# W0703 broad except warning
|
||||
#disable=C, R, W0212, W0403, W0603, W0612, W0613, W0703
|
||||
disable=C, R, W
|
||||
# W1401 anomalous-backslash-in-string
|
||||
disable=C, R, W0102, W0107, W0120, W0125, W0212, W0221, W0223, W0231, W0235, W0311,
|
||||
W0401, W0403, W0404, W0511, W0603, W0612, W0613, W0621, W0622, W0631, W0703, W1401
|
||||
|
||||
|
||||
[REPORTS]
|
||||
|
|
|
@ -14,6 +14,7 @@ nfv_client_dir = ../../nfv-client
|
|||
nfv_common_dir = ../../nfv-common
|
||||
nfv_plugins_dir = ../../nfv-plugins
|
||||
nfv_vim_dir = ../../nfv-vim
|
||||
stx_fault_dir = ../../../../stx-fault
|
||||
|
||||
nfv_client_src_dir = {[nfv]nfv_client_dir}/nfv_client
|
||||
nfv_common_src_dir = {[nfv]nfv_common_dir}/nfv_common
|
||||
|
@ -24,6 +25,7 @@ deps = {[nfv]nfv_client_dir}
|
|||
{[nfv]nfv_common_dir}
|
||||
{[nfv]nfv_plugins_dir}
|
||||
{[nfv]nfv_vim_dir}
|
||||
{[nfv]stx_fault_dir}/fm-api
|
||||
iso8601
|
||||
keyring
|
||||
kombu
|
||||
|
|
27
tox.ini
27
tox.ini
|
@ -47,7 +47,7 @@ commands =
|
|||
# E265 block comment should start with '# '
|
||||
# E251 unexpected spaces around keyword / parameter equals
|
||||
# E302 expected 2 blank lines, found 1
|
||||
# E303 too many blank lines
|
||||
# E303 too many blank lines
|
||||
# E501 line too long
|
||||
# E712 comparison to bool should be reworded
|
||||
|
||||
|
@ -81,3 +81,28 @@ commands = {[testenv]commands}
|
|||
cp -v nfv/nfv-tests/nfv_unit_tests/test_data/nfv_vim_db_18.03_GA {envdir}/
|
||||
nosetests --exe -w nfv/nfv-tests/nfv_unit_tests/tests/ '{posargs}'
|
||||
|
||||
[testenv:pylint]
|
||||
basepython = python2.7
|
||||
deps = {[testenv]deps}
|
||||
{toxinidir}/nfv/nfv-client
|
||||
{toxinidir}/nfv/nfv-common
|
||||
{toxinidir}/nfv/nfv-plugins
|
||||
{toxinidir}/nfv/nfv-vim
|
||||
{toxinidir}/../stx-fault/fm-api
|
||||
iso8601
|
||||
keyring
|
||||
kombu
|
||||
kubernetes
|
||||
passlib
|
||||
pecan
|
||||
pyparsing
|
||||
wsme
|
||||
pylint
|
||||
whitelist_externals = cp
|
||||
find
|
||||
commands = pylint nfv/nfv-client/nfv_client \
|
||||
nfv/nfv-common/nfv_common \
|
||||
nfv/nfv-plugins/nfv_plugins \
|
||||
nfv/nfv-vim/nfv_vim \
|
||||
--rcfile=nfv/nfv-tests/nfv_unit_tests/pylint.rc
|
||||
|
||||
|
|
Loading…
Reference in New Issue