From ff4eee280aaeb5c761b4c2274a1e5c97cf081cbe Mon Sep 17 00:00:00 2001 From: Hau Nguyen Date: Sun, 22 Jan 2023 11:51:44 +0700 Subject: [PATCH] chore: update Makefile with gofumpt --- Makefile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index fd6f2a1..8c8aba9 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,10 @@ .PHONY: all test test-color coverage coverage-cli coverate-html lint format build -all: test-color lint format +all: go mod tidy + $(MAKE) test-color + $(MAKE) lint + $(MAKE) format test: go test -race -failfast ./... @@ -13,10 +16,12 @@ test-color: coverage: go test -coverprofile=coverage.out ./... -coverage-cli: coverage +coverage-cli: + $(MAKE) coverage go tool cover -func=coverage.out -coverage-html: coverage +coverage-html: + $(MAKE) coverage go tool cover -html=coverage.out lint: @@ -26,7 +31,7 @@ format: go install github.com/haunt98/gofimports/cmd/gofimports@latest go install mvdan.cc/gofumpt@latest go install mvdan.cc/sh/v3/cmd/shfmt@latest - gofimports -w -company github.com/make-go-great . + gofimports -w --company github.com/make-go-great,github.com/haunt98 . gofumpt -w -extra . shfmt -w ./scripts