ansible-base/tools/check-json-syntax
2025-09-17 15:38:01 +02:00

17 lines
223 B
Bash
Executable file

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