Add go fmt before running test in Makefile

This commit is contained in:
Kenjiro Nakayama 2016-07-30 21:17:41 +09:00
parent f304ec9e53
commit a1765f0297
1 changed files with 5 additions and 0 deletions

View File

@ -27,6 +27,11 @@ cov:
open /tmp/coverage.html
test: generate
@echo "--> Running go fmt" ;
@if [ -n "`go fmt ${PACKAGES}`" ]; then \
echo "[ERR] go fmt updated formatting. Please commit formatted code first."; \
exit 1; \
fi
@sh -c "'$(PWD)/scripts/test.sh'"
@$(MAKE) vet