Move JSON linting to pep8

The docs job is not run in the gate, add the linting command from
the docs environment that checks for valid JSON files to the pep8
environement so that jobs run it.
Add a simple comment to both invocations to explain what it does.

Note that pep8 is our general linting target and thus should include
these kind of tests.

Change-Id: Ibb2ad29ca59b86fef41ebfe0ec3b8e8ea38e6d72
This commit is contained in:
Andreas Jaeger
2016-07-13 13:39:47 +02:00
parent ad4a6e9502
commit 190081c865

View File

@@ -27,6 +27,8 @@ basepython = python2.7
deps = hacking
commands =
bash tools/flake8wrap.sh {posargs}
# Check that all included JSON files are valid JSON
bash -c '! find doc/ -type f -name *.json | xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python'
[testenv:py34]
# NOTE(mriedem): If py34 fails with "db type could not be determined", delete
@@ -94,6 +96,7 @@ commands = {posargs}
commands =
rm -rf doc/source/api doc/build api-guide/build api-ref/build
python setup.py build_sphinx
# Check that all included JSON files are valid JSON
bash -c '! find doc/ -type f -name *.json | xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python'
oslo-config-generator --config-file=etc/nova/nova-config-generator.conf
oslopolicy-sample-generator --config-file=etc/nova/nova-policy-generator.conf