Cleaned up make lints' and make test's console output.
Change-Id: I8a2d7a31d1261b96892a261ec89e172310f4c292
diff --git a/Makefile b/Makefile
index ae04c2f..754763b 100644
--- a/Makefile
+++ b/Makefile
@@ -125,20 +125,26 @@
lint-style:
ifeq (,$(shell which gofmt))
- go get -u github.com/golang/go/src/cmd/gofmt;
+ go get -u github.com/golang/go/src/cmd/gofmt
endif
- gofmt_out="$$(gofmt -l $$(find . -name '*.go' -not -path './vendor/*'))" ;\
+ @echo "Running style check..."
+ @gofmt_out="$$(gofmt -l $$(find . -name '*.go' -not -path './vendor/*'))" ;\
if [ ! -z "$$gofmt_out" ]; then \
echo "$$gofmt_out" ;\
- echo "Lint failed on one or more files ^; run 'go fmt' to fix." ;\
+ echo "Style check failed on one or more files ^, run 'go fmt' to fix." ;\
exit 1 ;\
fi
+ @echo "Style check OK"
lint-sanity:
- go vet ./...
+ @echo "Running sanity check..."
+ @go vet ./...
+ @echo "Sanity check OK"
lint-dep:
- dep check
+ @echo "Running dependency check..."
+ @dep check
+ @echo "Dependency check OK"
lint: lint-style lint-sanity lint-dep
@@ -147,17 +153,17 @@
test:
ifeq (,$(GO_JUNIT_REPORT))
go get -u github.com/jstemmer/go-junit-report
- GO_JUNIT_REPORT=$(GOPATH)/bin/go-junit-report
+ @GO_JUNIT_REPORT=$(GOPATH)/bin/go-junit-report
endif
ifeq (,$(GOCOVER_COBERTURA))
go get -u github.com/t-yuki/gocover-cobertura
- GOCOVER_COBERTURA=$(GOPATH)/bin/gocover-cobertura
+ @GOCOVER_COBERTURA=$(GOPATH)/bin/gocover-cobertura
endif
- mkdir -p ./tests/results
+ @mkdir -p ./tests/results
- go test -v -coverprofile ./tests/results/go-test-coverage.out -covermode count ./... 2>&1 | tee ./tests/results/go-test-results.out ;\
+ @go test -v -coverprofile ./tests/results/go-test-coverage.out -covermode count ./... 2>&1 | tee ./tests/results/go-test-results.out ;\
RETURN=$$? ;\
$(GO_JUNIT_REPORT) < ./tests/results/go-test-results.out > ./tests/results/go-test-results.xml ;\
$(GOCOVER_COBERTURA) < ./tests/results/go-test-coverage.out > ./tests/results/go-test-coverage.xml ;\