Merge "Run bashate as part of the pep8 command"

This commit is contained in:
Jenkins 2015-12-20 03:05:23 +00:00 committed by Gerrit Code Review
commit 2630ecee5e
2 changed files with 17 additions and 19 deletions

@ -17,6 +17,7 @@ os-testr>=0.4.1
testresources>=0.2.4
testscenarios>=0.4
WebTest>=2.0
bashate>=0.2 # Apache-2.0
# Doc requirements
sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2

35
tox.ini

@ -26,6 +26,22 @@ commands = {toxinidir}/tools/states_to_dot.py -f {toxinidir}/doc/source/images/s
whitelist_externals = bash
commands =
flake8 {posargs}
# Run bashate during pep8 runs to ensure violations are caught by
# the check and gate queues.
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
-not -wholename \*scripts/configure-vm \ # that's a python script
\( \
-name \*.sh -or \ # add files eding with .sh
-wholename \*/lib/\* -or \ # add files under lib/
-wholename \*/tools/\* \ # add files under tools/
\) \
-print0 | xargs -0 bashate -v -iE006 -eE005,E042"
# Check that .po and .pot files are valid:
bash -c "find ironic -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"
@ -62,25 +78,6 @@ 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
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
-not -wholename \*scripts/configure-vm \ # that's a python script
\( \
-name \*.sh -or \ # add files eding with .sh
-wholename \*/lib/\* -or \ # add files under lib/
-wholename \*/tools/\* \ # add files under tools/
\) \
-print0 | xargs -0 bashate -v -iE006 -eE005,E042"
[flake8]
ignore = E129
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools