Merge "Add bashate tox command"
This commit is contained in:
20
tox.ini
20
tox.ini
@@ -1,7 +1,7 @@
|
||||
[tox]
|
||||
minversion = 1.8
|
||||
skipsdist = True
|
||||
envlist = py34,py27,pep8
|
||||
envlist = py34,py27,pep8,bashate
|
||||
|
||||
[testenv]
|
||||
usedevelop = True
|
||||
@@ -62,6 +62,24 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasen
|
||||
setenv = PYTHONHASHSEED=0
|
||||
commands = {posargs}
|
||||
|
||||
[testenv:bashate]
|
||||
deps =
|
||||
{env:BASHATE_INSTALL_PATH:bashate==0.3.2}
|
||||
whitelist_externals = bash
|
||||
# TODO(lucasagomes): Check the tools/ directory as well
|
||||
commands = bash -c "find {toxinidir}/devstack \
|
||||
-not \( -type d -name .?\* -prune \) \ # prune all 'dot' dirs
|
||||
-type f \ # only files
|
||||
-not -name \*.swp \ # skip editor files
|
||||
-not -name \*~ \ # skip editor files
|
||||
-not -name \*.xml \ # skip xml files
|
||||
-not -name \*.template \ # skip template files
|
||||
\( \
|
||||
-name \*.sh -or \ # add files eding with .sh
|
||||
-wholename \*/lib/\* \ # add files under lib/
|
||||
\) \
|
||||
-print0 | xargs -0 bashate -v -iE006 -eE005,E042"
|
||||
|
||||
[flake8]
|
||||
ignore = E129
|
||||
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools
|
||||
|
||||
Reference in New Issue
Block a user