Skip to content

Commit

Permalink
Merge pull request #161 from q384566678/makefile-test-fix
Browse files Browse the repository at this point in the history
Makefile: add gofmt and govet to test
  • Loading branch information
stevvooe authored Nov 23, 2017
2 parents db21b15 + 3ace3ab commit 5926358
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,20 @@ lint:
@echo "checking lint"
@./.tool/lint

test:
go test -v -race -cover $(shell go list ./... | grep -v /vendor/)
.PHONY: .gofmt .govet .gotest

PACKAGES = $(shell go list ./... | grep -v /vendor/)
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)


## this uses https://github.com/Masterminds/glide and https://github.com/sgotti/glide-vc
Expand Down

0 comments on commit 5926358

Please sign in to comment.