1f024e87ac
Nov 6th saw the release of a new version of python-libvirt. tox.ini did not have an upper-constraint set for it, so we picked up that version, which caused zuul to fail in pylint. Adding an upper-constraint to fix the issue. This allows all reviews in stx/utilities to pass zuul and be able to merge. Change-Id: Idcdf37fbfb2f8745aadff9aacba828e8166dbc46 Closes-Bug: 1851707 Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
108 lines
3.5 KiB
INI
108 lines
3.5 KiB
INI
[tox]
|
|
envlist = linters
|
|
minversion = 2.3
|
|
skipsdist = True
|
|
sitepackages=False
|
|
|
|
stxdir = {toxinidir}/..
|
|
|
|
[testenv]
|
|
install_command = pip install \
|
|
-v -v -v \
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt} \
|
|
-U {opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
OS_STDOUT_CAPTURE=1
|
|
OS_STDERR_CAPTURE=1
|
|
OS_DEBUG=1
|
|
OS_LOG_CAPTURE=1
|
|
deps =
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
whitelist_externals =
|
|
bash
|
|
|
|
[testenv:bashate]
|
|
# Treat all E* codes as Errors rather than warnings using: -e 'E*'
|
|
# The following codes are being suppressed:
|
|
# E006 line too long
|
|
# E010 The "do" should be on same line as for
|
|
# E041 Arithmetic expansion using $[ is deprecated for $((
|
|
# E042 local declaration hides errors
|
|
# E043 Arithmetic compound has inconsistent return semantics
|
|
# E044 Use [[ for non-POSIX comparisions
|
|
commands =
|
|
bash -c "find {toxinidir} \
|
|
-not \( -type d -name .?\* -prune \) \
|
|
-type f \
|
|
-not -name \*~ \
|
|
-not -name \*.md \
|
|
-name \*.sh \
|
|
-print0 | xargs -n 1 -0 bashate -v \
|
|
-i E006,E010,E041,E042,E043,E044 \
|
|
-e 'E*'"
|
|
|
|
[flake8]
|
|
# Note: hacking pulls in flake8 2.5.5 which can not parse an ignore list spanning multiple lines
|
|
# F errors are high priority to fix. W are warnings. E series are pep8, H series are hacking
|
|
# F401 'FOO' imported but unused
|
|
# F841 local variable 'FOO' is assigned to but never used
|
|
# W291 trailing whitespace
|
|
# W391 blank line at end of file
|
|
# E128 continuation line under-indented for visual indent
|
|
# E221 multiple spaces before operator
|
|
# E226 missing whitespace around arithmetic operator
|
|
# E227 missing whitespace around bitwise or shift operator
|
|
# E241 multiple spaces after ','
|
|
# E265 block comment should start with '# '
|
|
# E302 expected 2 blank lines, found 1
|
|
# E501 line too long
|
|
# E502 the backslash is redundant between brackets
|
|
# E702 multiple statements on one line (semicolon)
|
|
# H101 is TODO
|
|
# H104 File contains nothing but comments
|
|
# H201 no 'except:' at least use 'except Exception:'
|
|
# H238 old style class declaration, use new style (inherit from `object`)
|
|
# H306 imports not in alphabetical order (sys, re)
|
|
# H401 docstring should not start with a space
|
|
# H405 multi line docstring summary not separated with an empty line
|
|
ignore = F401,F841,W291,W391,E128,E221,E226,E227,E241,E265,E302,E501,E502,E702,H101,H104,H201,H238,H306,H401,H405
|
|
# max-line-length is not referenced if E501 is suppressed
|
|
max-line-length=80
|
|
|
|
[testenv:flake8]
|
|
commands =
|
|
flake8
|
|
|
|
[testenv:pylint]
|
|
basepython = python3
|
|
sitepackages = False
|
|
deps =
|
|
{[testenv]deps}
|
|
-e{[tox]stxdir}/config/tsconfig/tsconfig
|
|
-e{[tox]stxdir}/config/sysinv/sysinv/sysinv
|
|
-e{[tox]stxdir}/fault/fm-api
|
|
keyring
|
|
keystoneauth1
|
|
libvirt-python
|
|
oslo.messaging
|
|
oslo.service
|
|
pyinotify
|
|
python-daemon
|
|
python-novaclient
|
|
|
|
commands = pylint {posargs} \
|
|
ceph/ceph-manager/ceph-manager/ceph_manager \
|
|
ceph/python-cephclient/python-cephclient/cephclient \
|
|
utilities/logmgmt/logmgmt/logmgmt/ \
|
|
utilities/pci-irq-affinity-agent/pci_irq_affinity/pci_irq_affinity \
|
|
utilities/platform-util/platform-util/platform_util \
|
|
--rcfile=./pylint.rc
|
|
|
|
|
|
[testenv:linters]
|
|
commands =
|
|
{[testenv:bashate]commands}
|
|
{[testenv:flake8]commands}
|