Skip to content

Commit

Permalink
Makefile: simplify lint and coverage targets
Browse files Browse the repository at this point in the history
  • Loading branch information
Francisco Souza committed Dec 20, 2018
1 parent 832c6b4 commit fde35f8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,15 @@ testdeps:

lint: testdeps
cd /tmp && go get golang.org/x/lint/golint
golint $$(go list ./...)
golint ./...

gotest: testdeps
go test ./...

test: lint checkswagger gotest

coverage: lint checkswagger
@rm -f coverage.txt; for p in $$(go list ./...); do \
go test -coverprofile=profile.out -covermode=atomic $$p || export status=2; \
if [ -f profile.out ]; then cat profile.out >> coverage.txt; rm profile.out; fi \
done; \
exit $${status:-0}
go test -coverprofile=coverage.txt -covermode=atomic ./...

build:
go build
Expand Down

0 comments on commit fde35f8

Please sign in to comment.