Skip to content

Commit 14b5c83

Browse files
Raffovflaux
andauthored
Update scripts/validate-json-yaml.sh
Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>
1 parent b1d8344 commit 14b5c83

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

scripts/validate-json-yaml.sh

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,6 @@ EXCLUDE_PATTERN='(charts/external-dns/templates|mkdocs\.yml)'
1212

1313
errors=0
1414

15-
while IFS= read -r -d '' file; do
16-
if [[ "$file" =~ $EXCLUDE_PATTERN ]]; then
17-
continue
18-
fi
19-
if ! python3 -m json.tool "$file" > /dev/null 2>&1; then
20-
echo "FAIL: $file"
21-
errors=$((errors + 1))
22-
fi
23-
done < <(find . -name '*.json' -print0)
24-
2515
while IFS= read -r -d '' file; do
2616
if [[ "$file" =~ $EXCLUDE_PATTERN ]]; then
2717
continue
@@ -30,7 +20,7 @@ while IFS= read -r -d '' file; do
3020
echo "FAIL: $file"
3121
errors=$((errors + 1))
3222
fi
33-
done < <(find . \( -name '*.yaml' -o -name '*.yml' \) -print0)
23+
done < <(find . \( -name '*.json' -o -name '*.yaml' -o -name '*.yml' \) -print0)
3424

3525
if [ "$errors" -gt 0 ]; then
3626
echo ""

0 commit comments

Comments
 (0)