|
@@ -9,22 +9,22 @@ unset IFS
|
|
|
|
|
|
badFiles=()
|
|
badFiles=()
|
|
for f in "${files[@]}"; do
|
|
for f in "${files[@]}"; do
|
|
- # we use "git show" here to validate that what's committed has valid toml syntax
|
|
|
|
|
|
+ # we use "git show" here to validate that what's committed has valid TOML syntax
|
|
if ! git show "$VALIDATE_HEAD:$f" | tomlv /proc/self/fd/0 ; then
|
|
if ! git show "$VALIDATE_HEAD:$f" | tomlv /proc/self/fd/0 ; then
|
|
badFiles+=( "$f" )
|
|
badFiles+=( "$f" )
|
|
fi
|
|
fi
|
|
done
|
|
done
|
|
|
|
|
|
if [ ${#badFiles[@]} -eq 0 ]; then
|
|
if [ ${#badFiles[@]} -eq 0 ]; then
|
|
- echo 'Congratulations! All toml source files changed here have valid syntax.'
|
|
|
|
|
|
+ echo 'Congratulations! All TOML source files changed here have valid syntax.'
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- echo "These files are not valid toml:"
|
|
|
|
|
|
+ echo "These files are not valid TOML:"
|
|
for f in "${badFiles[@]}"; do
|
|
for f in "${badFiles[@]}"; do
|
|
echo " - $f"
|
|
echo " - $f"
|
|
done
|
|
done
|
|
echo
|
|
echo
|
|
- echo 'Please reformat the above files as valid toml'
|
|
|
|
|
|
+ echo 'Please reformat the above files as valid TOML'
|
|
echo
|
|
echo
|
|
} >&2
|
|
} >&2
|
|
false
|
|
false
|