fix vet make target to vet all packages

The vet target was only vetting the topmmost packages.
This commit is contained in:
James Bardin 2017-01-13 17:30:46 -05:00
parent 6ac39683ec
commit dfb1d9cbe0
1 changed files with 2 additions and 3 deletions

View File

@ -1,5 +1,4 @@
TEST?=$$(go list ./... | grep -v '/terraform/vendor/' | grep -v '/builtin/bins/') TEST?=$$(go list ./... | grep -v '/terraform/vendor/' | grep -v '/builtin/bins/')
VETARGS?=-all
GOFMT_FILES?=$$(find . -name '*.go' | grep -v vendor) GOFMT_FILES?=$$(find . -name '*.go' | grep -v vendor)
default: test vet default: test vet
@ -74,8 +73,8 @@ cover:
# vet runs the Go source code static analysis tool `vet` to find # vet runs the Go source code static analysis tool `vet` to find
# any common errors. # any common errors.
vet: vet:
@echo "go tool vet $(VETARGS) ." @echo "go vet ."
@go tool vet $(VETARGS) $$(ls -d */ | grep -v vendor) ; if [ $$? -eq 1 ]; then \ @go vet $$(go list ./... | grep -v vendor/) ; if [ $$? -eq 1 ]; then \
echo ""; \ echo ""; \
echo "Vet found suspicious constructs. Please check the reported constructs"; \ echo "Vet found suspicious constructs. Please check the reported constructs"; \
echo "and fix them if necessary before submitting the code for review."; \ echo "and fix them if necessary before submitting the code for review."; \