From 8843bdacc77f7760c3d03ed898acc4f5ef461a67 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sat, 26 Jan 2019 21:02:09 +0800 Subject: [PATCH] chore(makefile): remove unused method --- Makefile | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 9d2b789..bdcb676 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,6 @@ DEPLOY_IMAGE := $(EXECUTABLE) TARGETS ?= linux darwin windows PACKAGES ?= $(shell $(GO) list ./...) -GOFILES := $(shell find . -name "*.go" -type f) SOURCES ?= $(shell find . -name "*.go" -type f) TAGS ?= LDFLAGS ?= -X 'main.Version=$(VERSION)' @@ -30,17 +29,11 @@ endif all: build fmt: - $(GOFMT) -w $(GOFILES) + $(GOFMT) -w $(SOURCES) vet: $(GO) vet $(PACKAGES) -errcheck: - @which errcheck > /dev/null; if [ $$? -ne 0 ]; then \ - $(GO) get -u github.com/kisielk/errcheck; \ - fi - errcheck $(PACKAGES) - lint: @hash revive > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ $(GO) get -u github.com/mgechev/revive; \ @@ -58,18 +51,18 @@ misspell-check: @hash misspell > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ $(GO) get -u github.com/client9/misspell/cmd/misspell; \ fi - misspell -error $(GOFILES) + misspell -error $(SOURCES) .PHONY: misspell misspell: @hash misspell > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ $(GO) get -u github.com/client9/misspell/cmd/misspell; \ fi - misspell -w $(GOFILES) + misspell -w $(SOURCES) .PHONY: fmt-check fmt-check: - @diff=$$($(GOFMT) -d $(GOFILES)); \ + @diff=$$($(GOFMT) -d $(SOURCES)); \ if [ -n "$$diff" ]; then \ echo "Please run 'make fmt' and commit the result:"; \ echo "$${diff}"; \ @@ -79,9 +72,6 @@ fmt-check: test: fmt-check $(GO) test -v -cover -coverprofile coverage.txt ./... || exit 1 -html: - $(GO) tool cover -html=coverage.txt - install: $(SOURCES) $(GO) install -v -tags '$(TAGS)' -ldflags '$(EXTLDFLAGS)-s -w $(LDFLAGS)'