Modify goclean to use gometalint like btcd
This commit is contained in:
parent
c6e1d711da
commit
441bb918ec
2 changed files with 10 additions and 5 deletions
|
@ -6,8 +6,8 @@ sudo: false
|
||||||
install:
|
install:
|
||||||
- go get -d -t -v ./...
|
- go get -d -t -v ./...
|
||||||
- go get -v golang.org/x/tools/cmd/cover
|
- go get -v golang.org/x/tools/cmd/cover
|
||||||
- go get -v github.com/bradfitz/goimports
|
- go get -v github.com/alecthomas/gometalinter
|
||||||
- go get -v github.com/golang/lint/golint
|
- gometalinter --install
|
||||||
script:
|
script:
|
||||||
- export PATH=$PATH:$HOME/gopath/bin
|
- export PATH=$PATH:$HOME/gopath/bin
|
||||||
- ./goclean.sh
|
- ./goclean.sh
|
||||||
|
|
11
goclean.sh
11
goclean.sh
|
@ -5,14 +5,19 @@
|
||||||
# 3. golint (https://github.com/golang/lint)
|
# 3. golint (https://github.com/golang/lint)
|
||||||
# 4. go vet (http://golang.org/cmd/vet)
|
# 4. go vet (http://golang.org/cmd/vet)
|
||||||
# 5. test coverage (http://blog.golang.org/cover)
|
# 5. test coverage (http://blog.golang.org/cover)
|
||||||
|
#
|
||||||
|
# gometalinter (github.com/alecthomas/gometalinter) is used to run each each
|
||||||
|
# static checker.
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Automatic checks
|
# Automatic checks
|
||||||
test -z "$(gofmt -l -w . | tee /dev/stderr)"
|
test -z "$(gofmt -l -w . | tee /dev/stderr)"
|
||||||
test -z "$(goimports -l -w . | tee /dev/stderr)"
|
test -z "$(gometalinter --disable-all \
|
||||||
test -z "$(golint . | tee /dev/stderr)"
|
--enable=golint \
|
||||||
go vet ./...
|
--enable=vet \
|
||||||
|
--enable=goimports \
|
||||||
|
--deadline=20s ./... | tee /dev/stderr)"
|
||||||
env GORACE="halt_on_error=1" go test -v -race ./...
|
env GORACE="halt_on_error=1" go test -v -race ./...
|
||||||
|
|
||||||
# Run test coverage on each subdirectories and merge the coverage profile.
|
# Run test coverage on each subdirectories and merge the coverage profile.
|
||||||
|
|
Loading…
Reference in a new issue