twnet_parser/scripts/lint_json.sh

18 lines
226 B
Bash
Raw Normal View History

2023-04-02 09:51:21 +00:00
#!/bin/bash
printf 'Checking json '
for j in ./**/*.json;
do
[[ -f "$j" ]] || continue
if ! jq . "$j" &> /dev/null
then
echo -e "\nInvalid json file: $j";
jq . "$j" || exit 1;
else
printf '.'
fi
done
printf '\n'