balena-supervisor/gosuper/test_formatting.sh

15 lines
295 B
Bash
Raw Normal View History

#!/bin/bash
for dir in $(find ./* -path ./Godeps -prune -or -type d -print); do
errormessage=$(gofmt -l $dir)
if [ -n "$errormessage" ]; then
echo "$errormessage"
failed=1
2015-12-23 05:24:09 +00:00
fi
done
if [ -n "$failed" ]; then
echo "Bad formatting, run make format-gosuper to fix above errors."
exit 1
fi