Modify goclean to use gometalint like btcd

This commit is contained in:
John C. Vernaleo 2016-11-16 16:00:41 -05:00 committed by Dave Collins
parent c6e1d711da
commit 441bb918ec
2 changed files with 10 additions and 5 deletions

View file

@ -6,8 +6,8 @@ sudo: false
install:
- go get -d -t -v ./...
- go get -v golang.org/x/tools/cmd/cover
- go get -v github.com/bradfitz/goimports
- go get -v github.com/golang/lint/golint
- go get -v github.com/alecthomas/gometalinter
- gometalinter --install
script:
- export PATH=$PATH:$HOME/gopath/bin
- ./goclean.sh

View file

@ -5,14 +5,19 @@
# 3. golint (https://github.com/golang/lint)
# 4. go vet (http://golang.org/cmd/vet)
# 5. test coverage (http://blog.golang.org/cover)
#
# gometalinter (github.com/alecthomas/gometalinter) is used to run each each
# static checker.
set -e
# Automatic checks
test -z "$(gofmt -l -w . | tee /dev/stderr)"
test -z "$(goimports -l -w . | tee /dev/stderr)"
test -z "$(golint . | tee /dev/stderr)"
go vet ./...
test -z "$(gometalinter --disable-all \
--enable=golint \
--enable=vet \
--enable=goimports \
--deadline=20s ./... | tee /dev/stderr)"
env GORACE="halt_on_error=1" go test -v -race ./...
# Run test coverage on each subdirectories and merge the coverage profile.