Modify goclean to use gometalint like btcd
This commit is contained in:
parent
183acb4ad9
commit
1425c4327e
2 changed files with 11 additions and 6 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
|
||||||
|
|
13
goclean.sh
13
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)
|
||||||
|
#
|
||||||
|
# gometalint (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 "$(gometalinter --disable-all \
|
||||||
test -z "$(goimports -l -w . | tee /dev/stderr)"
|
--enable=gofmt \
|
||||||
test -z "$(golint . | tee /dev/stderr)"
|
--enable=goimports \
|
||||||
go vet ./...
|
--enable=golint \
|
||||||
|
--enable=vet \
|
||||||
|
--deadline=120s ./... | grep -v 'ExampleNew' 2>&1 | 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