forked from gcash/bchwallet
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgoclean.sh
More file actions
executable file
·27 lines (24 loc) · 853 Bytes
/
goclean.sh
File metadata and controls
executable file
·27 lines (24 loc) · 853 Bytes
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
#!/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)
#
# golangci-lint (https://github.com/golangci/golangci-lint) is used to run each static
# checker.
set -ex
# Make sure golangci-lint is installed and $GOPATH/bin is in your path.
if [ ! -x "$(type -p golangci-lint)" ]; then
exit 1
fi
# Automatic checks
test -z "$(golangci-lint run --disable-all \
--enable=gofmt \
--enable=revive \
--enable=vet \
--enable=gosimple \
--enable=unconvert \
--deadline=10m | grep -v 'ALL_CAPS\|OP_' 2>&1 | tee /dev/stderr)"
go test -tags rpctest ./...