Skip to content

Commit

Permalink
Makefile add govet to test
Browse files Browse the repository at this point in the history
Signed-off-by: zhouhao <[email protected]>
  • Loading branch information
zhouhao committed Sep 18, 2017
1 parent 64f77c0 commit 3ace3ab
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,18 @@ lint:
@echo "checking lint"
@./.tool/lint

.PHONY: .gofmt .gotest
.PHONY: .gofmt .govet .gotest

PACKAGES = $(shell go list ./... | grep -v /vendor/)
test: .gofmt .gotest
test: .gofmt .govet .gotest

FILES = $(shell find ./ -name *.go | grep -v vendor)
.gofmt:
OUT=$$(gofmt -s -d $(FILES)); if test -n "$${OUT}"; then echo "$${OUT}" && exit 1; fi

.govet:
go vet -x $(PACKAGES)

.gotest:
go test -v -race -cover $(PACKAGES)

Expand Down

0 comments on commit 3ace3ab

Please sign in to comment.