Move pylint checks to pep8 testenv
This change proposes to move pylint violation checks to the pep8 testenv. This changes make pylint gating within Neutron as it would participate in the vote. Having pylint executed on a separate job makes it difficult to handle potential unexpected breakages, because we need to get infra involved. When we need to renable the job, it is equally painful. Furthermore, it also causes us to spin an extra node, when the checks can easily be handled by the node for the pep8 job. Finally, having pylint running with tox -epep8 "helps" developers become aware of pylint violations sooner rather than later, if they "forget" to run the pylint testenv too before submitting the change. In order to make this patch succeed, a couple of pylint violation checks were skipped, as they slipped in, whilst the job was non-voting. We'll tackle them in due course. Change-Id: Ida6ae44a837d1761f5ce3e8a92f8850407f5cd16
This commit is contained in:
parent
55c6bf9cc5
commit
c0aa0b37c0
|
@ -38,12 +38,14 @@ disable=
|
||||||
global-variable-not-assigned,
|
global-variable-not-assigned,
|
||||||
no-init,
|
no-init,
|
||||||
non-parent-init-called,
|
non-parent-init-called,
|
||||||
|
not-callable,
|
||||||
protected-access,
|
protected-access,
|
||||||
redefined-builtin,
|
redefined-builtin,
|
||||||
redefined-outer-name,
|
redefined-outer-name,
|
||||||
signature-differs,
|
signature-differs,
|
||||||
star-args,
|
star-args,
|
||||||
super-init-not-called,
|
super-init-not-called,
|
||||||
|
super-on-old-class,
|
||||||
unpacking-non-sequence,
|
unpacking-non-sequence,
|
||||||
unused-argument,
|
unused-argument,
|
||||||
unused-import,
|
unused-import,
|
||||||
|
|
13
tox.ini
13
tox.ini
|
@ -50,11 +50,15 @@ sitepackages = True
|
||||||
downloadcache = ~/cache/pip
|
downloadcache = ~/cache/pip
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
commands =
|
deps =
|
||||||
|
{[testenv]deps}
|
||||||
|
pylint
|
||||||
|
commands=
|
||||||
# If it is easier to add a check via a shell script, consider adding it in this file
|
# If it is easier to add a check via a shell script, consider adding it in this file
|
||||||
sh ./tools/misc-sanity-checks.sh
|
sh ./tools/misc-sanity-checks.sh
|
||||||
flake8
|
flake8
|
||||||
neutron-db-manage check_migration
|
neutron-db-manage check_migration
|
||||||
|
pylint --rcfile=.pylintrc --output-format=colorized {posargs:neutron}
|
||||||
whitelist_externals = sh
|
whitelist_externals = sh
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
|
@ -81,13 +85,6 @@ show-source = true
|
||||||
builtins = _
|
builtins = _
|
||||||
exclude = ./.*,build,dist,neutron/openstack/common/*
|
exclude = ./.*,build,dist,neutron/openstack/common/*
|
||||||
|
|
||||||
[testenv:pylint]
|
|
||||||
deps =
|
|
||||||
{[testenv]deps}
|
|
||||||
pylint
|
|
||||||
commands =
|
|
||||||
pylint --rcfile=.pylintrc --output-format=colorized {posargs:neutron}
|
|
||||||
|
|
||||||
[hacking]
|
[hacking]
|
||||||
import_exceptions = neutron.i18n
|
import_exceptions = neutron.i18n
|
||||||
local-check-factory = neutron.hacking.checks.factory
|
local-check-factory = neutron.hacking.checks.factory
|
||||||
|
|
Loading…
Reference in New Issue