Merge pull request #1087 from harshavardhana/go-vet

Add go tool vet checks and also enable detecting invalid shadow variables
This commit is contained in:
Harshavardhana
2015-09-09 16:01:20 -07:00
2 changed files with 7 additions and 4 deletions
+2 -2
View File
@@ -12,10 +12,10 @@ $ sudo apt-get install git build-essential
Download Go 1.5+ from [https://golang.org/dl/](https://golang.org/dl/).
```sh
$ wget https://storage.googleapis.com/golang/go1.5.linux-amd64.tar.gz
$ wget https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz
$ mkdir -p ${HOME}/bin/
$ mkdir -p ${HOME}/go/
$ tar -C ${HOME}/bin/ -xzf go1.5.linux-amd64.tar.gz
$ tar -C ${HOME}/bin/ -xzf go1.5.1.linux-amd64.tar.gz
```
##### Setup GOROOT and GOPATH
+5 -2
View File
@@ -20,8 +20,11 @@ verifiers: getdeps vet fmt lint cyclo deadcode
vet:
@echo "Running $@:"
@GO15VENDOREXPERIMENT=1 go vet .
@GO15VENDOREXPERIMENT=1 go vet github.com/minio/mc/pkg...
@GO15VENDOREXPERIMENT=1 go tool vet -all *.go
@GO15VENDOREXPERIMENT=1 go tool vet -all ./pkg
@GO15VENDOREXPERIMENT=1 go tool vet -shadow=true *.go
@GO15VENDOREXPERIMENT=1 go tool vet -shadow=true ./pkg
fmt:
@echo "Running $@:"
@GO15VENDOREXPERIMENT=1 gofmt -s -l *.go