improve linting

This commit is contained in:
Casey Lee
2019-01-15 17:41:02 -08:00
parent 2b471fbff0
commit 6f07c10d8c
9 changed files with 161 additions and 68 deletions

View File

@@ -15,15 +15,11 @@ TAG_VERSION = v$(VERSION)
default: check
deps:
@GO111MODULE=off go get honnef.co/go/tools/cmd/staticcheck
@GO111MODULE=off go get golang.org/x/lint/golint
@GO111MODULE=off go get github.com/fzipp/gocyclo
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $$(go env GOPATH)/bin v1.12.5
check:
go vet ./...
golint -set_exit_status ./...
staticcheck ./...
gocyclo -over 10 .
golangci-lint run
go test -cover ./...
build: deps check