infrastructure/tools/check-json-syntax

17 lines
216 B
Text
Raw Permalink Normal View History

2024-06-01 16:41:29 +02:00
#!/usr/bin/env bash
## consts
dir_base="."
## exec
flaws=0
for path in $(find ${dir_base} -name "*.json")
do
echo "-- ${path}"
python3 -m json.tool ${path} > /dev/null || ((flaws+=1))
done
test ${flaws} -eq 0