Run bashate as part of the pep8 command
In order to save gate resources we could just run bashate as part of the the pep8 command. The tox bashate command is removed and bashate is added as a dependency in the test-requirements.txt file. Change-Id: I75df4103c0154c5424b8781c1db3480336a5e1d2
This commit is contained in:
parent
f047ea0f7e
commit
95fcd6433b
@ -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
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
|
||||
|
Loading…
Reference in New Issue
Block a user