forked from gcash/bchwallet
-
Notifications
You must be signed in to change notification settings - Fork 2
/
goclean.sh
executable file
·28 lines (25 loc) · 865 Bytes
/
goclean.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
# The script does automatic checking on a Go package and its sub-packages, including:
# 1. gofmt (http://golang.org/cmd/gofmt/)
# 2. golint (https://github.com/golang/lint)
# 3. go vet (http://golang.org/cmd/vet)
# 4. gosimple (https://github.com/dominikh/go-simple)
# 5. unconvert (https://github.com/mdempsky/unconvert)
#
# gometalinter.v2 (gopkg.in/alecthomas/gometalinter.v2) is used to run each static
# checker.
set -ex
# Make sure gometalinter is installed and $GOPATH/bin is in your path.
if [ ! -x "$(type -p gometalinter.v2)" ]; then
exit 1
fi
# Automatic checks
test -z "$(gometalinter.v2 --disable-all \
--enable=gofmt \
--enable=golint \
--enable=vet \
--enable=gosimple \
--enable=unconvert \
--deadline=10m \
--vendor ./... | grep -v 'ALL_CAPS\|OP_' 2>&1 | tee /dev/stderr)"
go test -tags rpctest ./...