180740305c
flake8 doesn't actually have any issues if you do and adding exclusions deletes flake8's rather comprehensive list of exceptions enabled by default. Change-Id: I2097a4ad095e60064c16d6e1948996f4b11d7af8
48 lines
1.3 KiB
INI
48 lines
1.3 KiB
INI
[tox]
|
|
minversion = 2.0
|
|
envlist = py27,pep8,linters
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
usedevelop = True
|
|
install_command = pip install -U {opts} {packages}
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands = python setup.py test
|
|
|
|
[testenv:linters]
|
|
whitelist_externals = bash
|
|
commands =
|
|
pip install pykwalify
|
|
bash -c "cd ansible; find . -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 \
|
|
ansible-lint \
|
|
-x ANSIBLE0013,ANSIBLE0012,ANSIBLE0006,ANSIBLE0007,ANSIBLE0010,ANSIBLE0016"
|
|
python ci-scripts/linters/lint-browbeat-config.py lib/validate.yaml browbeat-config.yaml
|
|
python ci-scripts/linters/lint-browbeat-config.py lib/validate.yaml browbeat-complete.yaml
|
|
bash -c "for config in $(ls conf/); do \
|
|
python ci-scripts/linters/lint-browbeat-config.py lib/validate.yaml conf/$config; done"
|
|
|
|
[testenv:pep8]
|
|
commands = flake8 {posargs}
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:cover]
|
|
commands = python setup.py test --coverage --testr-args='{posargs}'
|
|
|
|
[testenv:docs]
|
|
commands = python setup.py build_sphinx
|
|
|
|
[testenv:debug]
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[flake8]
|
|
# E123, E125 skipped as they are invalid PEP-8.
|
|
show-source = True
|
|
ignore = E123,E125,E226,E302,E41,E111,E231,E203,H233,H306,H238,H236,H404,H405
|
|
max-line-length = 100
|
|
builtins = _
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,ansible/*
|