Check go generate on builds

* Check if we have mismatching `go generate ./...` output on builds
pull/877/head
Boyan Soubachov 2020-01-28 22:25:54 +11:00 committed by Boyan Soubachov
parent 12fe0eb94c
commit 9cc41e665b
1 changed files with 7 additions and 0 deletions

View File

@ -5,3 +5,10 @@ if [ -n "$(gofmt -l .)" ]; then
gofmt -d .
exit 1
fi
go generate ./...
if [ -n "$(git status -s -uno)" ]; then
echo "Go generate output does not match commit."
echo "Did you forget to run go generate ./... ?"
exit 1
fi