Merge "Add validate-json tox target"
This commit is contained in:
commit
76a1602900
1
test-requirements.txt
Normal file
1
test-requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
demjson
|
19
tools/validate-json.sh
Executable file
19
tools/validate-json.sh
Executable file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
TMPFILE=$(mktemp)
|
||||
ret=0
|
||||
|
||||
function clean {
|
||||
rm -f ${TMPFILE}
|
||||
}
|
||||
trap clean EXIT
|
||||
|
||||
for f in $(find docker/ -type f -name '*.json');do
|
||||
jsonlint -s ${f} >${TMPFILE}
|
||||
egrep -q 'has errors$' ${TMPFILE} && { cat ${TMPFILE}; ret=1 ;}
|
||||
done
|
||||
|
||||
cat ${TMPFILE}
|
||||
|
||||
exit ${ret}
|
Loading…
Reference in New Issue
Block a user