aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Hanley <felix@userspace.com.au>2019-08-29 06:28:53 +0000
committerFelix Hanley <felix@userspace.com.au>2019-08-29 06:28:53 +0000
commit17c66d00d2b076b78434a8c3bd94dbcfab4f0463 (patch)
treeef6e34769d9e4bbbbc190f18a46dcdcb1329e84c
parent19f04a689c3058e3cee7fa7496d0e96343fd2ec6 (diff)
downloadlexer-17c66d00d2b076b78434a8c3bd94dbcfab4f0463.tar.gz
lexer-17c66d00d2b076b78434a8c3bd94dbcfab4f0463.tar.bz2
Clean up 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}'