Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 25 lines (21 sloc) 822 Bytes
#!/bin/bash
# The script does automatic checking on a Go package and its sub-packages, including:
# 1. gofmt (http://golang.org/cmd/gofmt/)
# 2. go vet (http://golang.org/cmd/vet)
# 3. gosimple (https://github.com/dominikh/go-simple)
# 4. unconvert (https://github.com/mdempsky/unconvert)
# 5. ineffassign (https://github.com/gordonklaus/ineffassign)
# 6. race detector (http://blog.golang.org/race-detector)
# 7. test coverage (http://blog.golang.org/cover)
set -ex
# run tests
env GORACE="halt_on_error=1" go test -race ./...
# golangci-lint (github.com/golangci/golangci-lint) is used to run each each
# static checker.
# check linters
golangci-lint run --disable-all --deadline=10m \
--enable=gofmt \
--enable=vet \
--enable=gosimple \
--enable=unconvert \
--enable=ineffassign
You can’t perform that action at this time.