2 # The script does automatic checking on a Go package and its sub-packages, including:
3 # 1. gofmt (http://golang.org/cmd/gofmt/)
4 # 2. golint (https://github.com/golang/lint)
5 # 3. go vet (http://golang.org/cmd/vet)
6 # 4. gosimple (https://github.com/dominikh/go-simple)
7 # 5. unconvert (https://github.com/mdempsky/unconvert)
9 # gometalinter (github.com/alecthomas/gometalinter) is used to run each static
14 # Make sure glide is installed and $GOPATH/bin is in your path.
15 # $ go get -u github.com/Masterminds/glide
17 if [ ! -x "$(type -p glide)" ]; then
21 # Make sure gometalinter is installed and $GOPATH/bin is in your path.
22 # $ go get -v github.com/alecthomas/gometalinter"
23 # $ gometalinter --install"
24 if [ ! -x "$(type -p gometalinter)" ]; then
28 linter_targets=$(glide novendor)
31 test -z "$(gometalinter -j 4 --disable-all \
37 --deadline=10m $linter_targets 2>&1 | grep -v 'ALL_CAPS\|OP_' 2>&1 | tee /dev/stderr)"
38 go test -tags rpctest $linter_targets