From 3a79620e92373b98a163da9665569f700f1033fe Mon Sep 17 00:00:00 2001 From: Matthew Hooker Date: Tue, 1 Nov 2016 13:49:13 -0700 Subject: [PATCH] fail test target if we have gofmt problems --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 95a627f81..9fbaab871 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ GITSHA:=$(shell git rev-parse HEAD) # Get the current local branch name from git (if we can, this may be blank) GITBRANCH:=$(shell git symbolic-ref --short HEAD 2>/dev/null) GOFMT_FILES?=$$(find . -not -path "./vendor/*" -name "*.go") + default: deps generate test dev ci: deps test @@ -55,7 +56,7 @@ generate: deps ## Generate dynamically generated code go generate . gofmt -w command/plugin.go -test: deps ## Run unit tests +test: deps fmt-check ## Run unit tests @go test $(TEST) $(TESTARGS) -timeout=2m @go tool vet $(VET) ; if [ $$? -eq 1 ]; then \ echo "ERROR: Vet found problems in the code."; \