Skip to content

Commit 4e05ce8

Browse files
committed
Add file formats to validate
1 parent d5d384c commit 4e05ce8

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

.github/sh/validate_data_files.sh

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,15 @@ ff() {
1111

1212
val() {
1313
for el in $(ff "${1}"); do
14-
dasel -f "${el}" -r yaml >/dev/null 2>&1 || {
14+
dasel -f "${el}" >/dev/null 2>&1 || {
1515
echo -e "\n[error] invalid file: ${el}"
16-
dasel -f "${el}" -r yaml
16+
dasel -f "${el}"
17+
echo ""
1718
x=1
1819
}
1920
done
2021
}
2122

2223
x=0
23-
val "ya?ml$"
24-
val "csv$"
25-
echo ""
24+
val "\.(csv|json|ya?ml|toml)$"
2625
exit ${x}

0 commit comments

Comments
 (0)