From 3f7a1171481c8d65f6ba0a0ee6f71036be532f7b Mon Sep 17 00:00:00 2001 From: Christoph Blecker Date: Wed, 26 Apr 2017 18:51:22 -0700 Subject: [PATCH] build: Fix Travis vet issues (#14010) * Use latest in go 1.8 branch for travis * Fix ongoing vet issues Move vet step after the testing step in travis Correct Makefile vet step to check correct files --- .travis.yml | 4 ++-- Makefile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 04cc6f309..04a959936 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ dist: trusty sudo: false language: go go: -- 1.8 +- 1.8.x # add TF_CONSUL_TEST=1 to run consul tests # they were causing timouts in travis @@ -25,7 +25,7 @@ install: - bash scripts/gogetcookie.sh - go get github.com/kardianos/govendor script: -- make vet vendor-status test +- make vendor-status test vet - GOOS=windows go build branches: only: diff --git a/Makefile b/Makefile index 319492ef1..0eba369dc 100644 --- a/Makefile +++ b/Makefile @@ -75,8 +75,8 @@ cover: # vet runs the Go source code static analysis tool `vet` to find # any common errors. vet: - @echo "go vet ." - @go vet $$(go list ./... | grep -v vendor/) ; if [ $$? -eq 1 ]; then \ + @echo 'go vet $$(go list ./... | grep -v /terraform/vendor/)' + @go vet $$(go list ./... | grep -v /terraform/vendor/) ; 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 review."; \