Skip to content

Commit

Permalink
simplify Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitris committed Apr 29, 2020
1 parent 97fc581 commit 0d43c07
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@

# This Makefile is adopted from https://github.com/hashicorp/consul/blob/master/Makefile

DEPS = $(shell go list -f '{{range .TestImports}}{{.}} {{end}}' ./...)

PACKAGES = $(shell go list ./...)
VETARGS?=-asmdecl -atomic -bool -buildtags -copylocks -methods \
-nilfunc -rangeloops -shift -structtags -unsafeptr
#-printf

all: format build

cov:
Expand All @@ -33,16 +26,9 @@ test-cover:
go test --cover ./...

format:
@go fmt $(PACKAGES)
@gofmt -l .

vet:
@go tool vet 2>/dev/null ; if [ $$? -eq 3 ]; then \
go get golang.org/x/tools/cmd/vet; \
fi
@go tool vet $(VETARGS) . ; if [ $$? -eq 1 ]; then \
echo ""; \
echo "Vet found suspicious constructs. Please check the reported constructs"; \
echo "and fix them if necessary before submitting the code for reviewal."; \
fi
@go vet ./...

.PHONY: all cov build test vet web web-push

0 comments on commit 0d43c07

Please sign in to comment.