Merge pull request #621 from dlorenc/gofmt

Make the gofmt error a little easier to read in tests.
pull/623/head
dlorenc 2016-09-22 15:21:06 -07:00 committed by GitHub
commit 05edfeaf65
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..."