diff --git a/.drone.yml b/.drone.yml index fce76e338..36e912f2d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -16,6 +16,7 @@ steps: GOPROXY: https://proxy.golang.org commands: - make test + - make staticcheck when: event: - pull_request diff --git a/Makefile b/Makefile index 7ae4690fd..e1c584913 100644 --- a/Makefile +++ b/Makefile @@ -9,6 +9,10 @@ build: deps install: deps go install ./... +staticcheck: + GO111MODULE=off go get honnef.co/go/tools/cmd/staticcheck + staticcheck ./... + lint: deps GO111MODULE=off go get golang.org/x/lint/golint for file in $$(find . -name '*.go' | grep -v '\.pb\.go\|\.pb\.gw\.go\|examples\|pubsub\/aws\/awssub_test\.go' | grep -v 'server\/kit\/kitserver_pb_test\.go'); do \ @@ -31,4 +35,5 @@ coverage: deps lint \ pretest \ test \ - coverage + coverage \ + staticcheck