Duplicate JSON line ending check to pep8
The docs job is not run in the gate, meaning invalid JSON files with \r\n line endings are able to sneak in. Duplicate the checks from the docs environment to the pep8 environment so that gate jobs run it. Note that pep8 is our general linting target and thus should include these kind of tests. Change-Id: Ie923902b04be79b9f66ba1841c60899a413f6439 Closes-Bug: #1673131
This commit is contained in:
parent
66d7ca90d8
commit
ac2a4abfca
2
tox.ini
2
tox.ini
@ -39,6 +39,8 @@ commands =
|
||||
basepython = python2.7
|
||||
commands =
|
||||
bash tools/flake8wrap.sh {posargs}
|
||||
# Check that all JSON files don't have \r\n in line.
|
||||
bash -c "! find doc/ -type f -name *.json | xargs grep -U -n $'\r'"
|
||||
# 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'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user