aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 5 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index f2a809d..8243281 100644
--- a/Makefile
+++ b/Makefile
@@ -1,24 +1,18 @@
-GOPATH ?= $(HOME)/go
-pkgs := $(shell go list ./...)
-
.PHONY: test
test: lint ## Run tests with coverage
- go test -short -cover -coverprofile coverage.txt $(pkgs)
+ go test -short -cover -coverprofile coverage.txt ./...
go tool cover -html=coverage.txt -o coverage.html
.PHONY: lint
-lint: $(GOPATH)/bin/golint ## Run the code linter
- @golint $(pkgs)
-
-$(GOPATH)/bin/golint:
- go get -u golang.org/x/lint/golint
+lint: ## Run the code linter
+ revive ./...
.PHONY: clean
clean: ## Clean all test files
- @rm -rf coverage*
+ rm -rf coverage*
.PHONY: help
help:
- @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) |sort \
+ grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) |sort \
|awk 'BEGIN{FS=":.*?## "};{printf "\033[36m%-30s\033[0m %s\n",$$1,$$2}'