Make the gofmt error a little easier to read in tests.

pull/621/head
dlorenc 2016-09-22 13:45:29 -07:00
parent 90d9561205
commit 4299294814
1 changed files with 7 additions and 1 deletions

View File

@ -47,7 +47,13 @@ ignore="vendor\|\_gopath\|assets.go"
# Check gofmt
echo "Checking gofmt..."
diff -u <(echo -n) <(gofmt -l -s . | grep -v ${ignore})
set +e
files=$(gofmt -l -s . | grep -v ${ignore})
set -e
if [[ $files ]]; then
echo "Gofmt errors in files: $files"
exit 1
fi
# Check boilerplate
echo "Checking boilerplate..."