Make the gofmt error a little easier to read in tests.
parent
90d9561205
commit
4299294814
8
test.sh
8
test.sh
|
@ -47,7 +47,13 @@ ignore="vendor\|\_gopath\|assets.go"
|
||||||
|
|
||||||
# Check gofmt
|
# Check gofmt
|
||||||
echo "Checking 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
|
# Check boilerplate
|
||||||
echo "Checking boilerplate..."
|
echo "Checking boilerplate..."
|
||||||
|
|
Loading…
Reference in New Issue