Don't run `go vet` on vendor/

This commit is contained in:
Sean Chittenden 2016-02-12 18:52:40 -08:00
parent 8d5555246f
commit 0c8b66ddca
1 changed files with 6 additions and 1 deletions

View File

@ -43,7 +43,12 @@ vet:
go get golang.org/x/tools/cmd/vet; \
fi
@echo "--> Running go tool vet $(VETARGS) ."
@go tool vet $(VETARGS) . ; if [ $$? -eq 1 ]; then \
@go list ./... \
| grep -v ^github.com/hashicorp/consul/vendor/ \
| cut -d '/' -f 4- \
| xargs -n1 \
go tool vet $(VETARGS) ;\
if [ $$? -eq 1 ]; then \
echo ""; \
echo "Vet found suspicious constructs. Please check the reported constructs"; \
echo "and fix them if necessary before submitting the code for reviewal."; \