2015-01-31 05:08:53 +01:00
|
|
|
#!/bin/bash
|
|
|
|
# The script does automatic checking on a Go package and its sub-packages, including:
|
|
|
|
# 1. gofmt (http://golang.org/cmd/gofmt/)
|
2016-05-06 17:47:53 +02:00
|
|
|
# 3. go vet (http://golang.org/cmd/vet)
|
2016-11-21 16:17:32 +01:00
|
|
|
# 4. gosimple (https://github.com/dominikh/go-simple)
|
|
|
|
# 5. unconvert (https://github.com/mdempsky/unconvert)
|
2016-11-02 23:36:32 +01:00
|
|
|
#
|
2015-01-31 05:08:53 +01:00
|
|
|
|
2015-04-14 21:13:13 +02:00
|
|
|
set -ex
|
2015-01-31 05:08:53 +01:00
|
|
|
|
2020-05-13 14:44:07 +02:00
|
|
|
go test -tags="rpctest" ./...
|
2016-12-09 23:06:51 +01:00
|
|
|
|
2015-01-31 05:08:53 +01:00
|
|
|
# Automatic checks
|
2020-05-13 14:44:07 +02:00
|
|
|
golangci-lint run --deadline=10m --disable-all \
|
2016-11-02 23:36:32 +01:00
|
|
|
--enable=gofmt \
|
|
|
|
--enable=vet \
|
2016-11-03 05:53:07 +01:00
|
|
|
--enable=gosimple \
|
2020-05-13 14:44:07 +02:00
|
|
|
--enable=unconvert
|