From 17c66d00d2b076b78434a8c3bd94dbcfab4f0463 Mon Sep 17 00:00:00 2001 From: Felix Hanley Date: Thu, 29 Aug 2019 16:28:53 +1000 Subject: Clean up Makefile --- Makefile | 16 +++++----------- 1 file 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}' -- cgit v1.2.3