Skip to content
This repository was archived by the owner on Nov 7, 2022. It is now read-only.

Commit e97edac

Browse files
tigrannajaryanPaulo Janotti
authored andcommitted
Fix "vet" target in makefile (#558)
Previously "vet" target was coded to fail if govet produced any output, which is not a correct assumption. Govet can produce output even in case of success [1]. The correct way to know if govet is successful is to rely on exit code, which is exactly what is done now after this change. [1] - see for example https://travis-ci.org/census-instrumentation/opencensus-service/builds/536550187
1 parent 2157469 commit e97edac

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Makefile

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,8 @@ lint:
7373

7474
.PHONY: vet
7575
vet:
76-
@VETOUT=`$(GOVET) ./... 2>&1`; \
77-
if [ "$$VETOUT" ]; then \
78-
echo "$(GOVET) FAILED => clean the following vet errors:\n"; \
79-
echo "$$VETOUT\n"; \
80-
exit 1; \
81-
else \
82-
echo "Vet finished successfully"; \
83-
fi
76+
@$(GOVET) ./...
77+
@echo "Vet finished successfully"
8478

8579
.PHONY: install-tools
8680
install-tools:

0 commit comments

Comments
 (0)