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
This commit is contained in:
parent
8eb3ac2b71
commit
3f7a117148
|
@ -2,7 +2,7 @@ dist: trusty
|
||||||
sudo: false
|
sudo: false
|
||||||
language: go
|
language: go
|
||||||
go:
|
go:
|
||||||
- 1.8
|
- 1.8.x
|
||||||
|
|
||||||
# add TF_CONSUL_TEST=1 to run consul tests
|
# add TF_CONSUL_TEST=1 to run consul tests
|
||||||
# they were causing timouts in travis
|
# they were causing timouts in travis
|
||||||
|
@ -25,7 +25,7 @@ install:
|
||||||
- bash scripts/gogetcookie.sh
|
- bash scripts/gogetcookie.sh
|
||||||
- go get github.com/kardianos/govendor
|
- go get github.com/kardianos/govendor
|
||||||
script:
|
script:
|
||||||
- make vet vendor-status test
|
- make vendor-status test vet
|
||||||
- GOOS=windows go build
|
- GOOS=windows go build
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -75,8 +75,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 vet ."
|
@echo 'go vet $$(go list ./... | grep -v /terraform/vendor/)'
|
||||||
@go vet $$(go list ./... | grep -v vendor/) ; if [ $$? -eq 1 ]; then \
|
@go vet $$(go list ./... | grep -v /terraform/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."; \
|
||||||
|
|
Loading…
Reference in New Issue