local-check: fail build if gofmt detects differences
It seems to exit code 0 in all cases.
@@ -74,7 +74,7 @@ test-cross:
.PHONY: local-check local-build local-test local
local-check: $(LINUXKIT_DEPS)
- @echo gofmt... && gofmt -s -l $(filter %.go,$(LINUXKIT_DEPS))
+ @echo gofmt... && o=$$(gofmt -s -l $(filter %.go,$(LINUXKIT_DEPS))) && if [ -n "$$o" ] ; then echo $$o ; exit 1 ; fi
@echo govet... && go tool vet -printf=false $(filter %.go,$(LINUXKIT_DEPS))
@echo golint... && set -e ; for i in $(filter %.go,$(LINUXKIT_DEPS)); do golint $$i ; done
@echo ineffassign... && ineffassign $(filter %.go,$(LINUXKIT_DEPS))
