Skip to content

Commit

Permalink
Add file formats to validate
Browse files Browse the repository at this point in the history
  • Loading branch information
triole committed Jan 30, 2025
1 parent d5d384c commit 4e05ce8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/sh/validate_data_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,15 @@ ff() {

val() {
for el in $(ff "${1}"); do
dasel -f "${el}" -r yaml >/dev/null 2>&1 || {
dasel -f "${el}" >/dev/null 2>&1 || {
echo -e "\n[error] invalid file: ${el}"
dasel -f "${el}" -r yaml
dasel -f "${el}"
echo ""
x=1
}
done
}

x=0
val "ya?ml$"
val "csv$"
echo ""
val "\.(csv|json|ya?ml|toml)$"
exit ${x}

0 comments on commit 4e05ce8

Please sign in to comment.