From 44b37e8a825acc5af986a836a4f19c416a5ee9cc Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sat, 15 Nov 2025 11:09:02 +0100 Subject: [PATCH] build: format a bit the list of tools --- Makefile | 23 ++++++++++++----------- bin/external-tool | 2 ++ 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 6d79d150..c2321ed0 100644 --- a/Makefile +++ b/Makefile @@ -72,15 +72,15 @@ all-indep: $(GENERATED) # Tools -ENUMER = go tool enumer -GOIMPORTS = go tool goimports -GOTESTSUM = go tool gotestsum -MOCKGEN = go tool mockgen -PIGEON = go tool pigeon -REVIVE = go tool revive +BUF = env GO=$(GO) ./bin/external-tool buf +ENUMER = go tool enumer +GOIMPORTS = go tool goimports +GOTESTSUM = go tool gotestsum +MOCKGEN = go tool mockgen +PIGEON = go tool pigeon +REVIVE = go tool revive STATICCHECK = go tool staticcheck -WWHRD = go tool wwhrd -BUF = env GO=$(GO) ./bin/external-tool buf +WWHRD = go tool wwhrd # Generated files @@ -197,8 +197,8 @@ test-go-checks: ; $(info $(M) running Go static checks…) $Q $(STATICCHECK) -f stylish -checks inherit,-SA1012 $(PKGS) test-go-units: ; $(info $(M) running Go tests$(GOTEST_MORE)…) $Q mkdir -p test/go - $Q env PATH=$(dir $(abspath $(shell command -v $(GO)))):$(PATH) $(GOTESTSUM) \ - --junitfile test/go/tests.xml -- \ + $Q env PATH=$(dir $(abspath $(shell command -v $(GO)))):$(PATH) \ + $(GOTESTSUM) --junitfile test/go/tests.xml -- \ -timeout $(TIMEOUT) \ -fullpath \ $(GOTEST_ARGS) $(PKGS) @@ -215,7 +215,8 @@ test-bench: ; $(info $(M) running benchmarks…) @ ## Run Go benchmarks $(PKGS) # -benchmem -memprofile test/go/memprofile.out -cpuprofile test/go/cpuprofile.out test-coverage-go: ; $(info $(M) running Go coverage tests…) @ ## Run Go coverage tests $Q mkdir -p test/go - $Q env PATH=$(dir $(abspath $(shell command -v $(GO)))):$(PATH) $(GOTESTSUM) -- \ + $Q env PATH=$(dir $(abspath $(shell command -v $(GO)))):$(PATH) \ + $(GOTESTSUM) -- \ -fullpath \ -coverpkg=$(shell echo $(PKGS) | tr ' ' ',') \ -covermode=atomic \ diff --git a/bin/external-tool b/bin/external-tool index 7ac63b8a..711e8434 100755 --- a/bin/external-tool +++ b/bin/external-tool @@ -4,6 +4,8 @@ # a case we don't want to put the dependency in go.mod (which may be considered # by an anti-pattern for some tools). +# See commit 414d626bf8f2 for an alternative. + cmd="$1" shift