From b1d6388624e1a5a57ce68f2e51e96b22d4982e9a Mon Sep 17 00:00:00 2001 From: Holger Obermaier <40787752+ho-ob@users.noreply.github.com> Date: Tue, 24 Feb 2026 15:38:13 +0100 Subject: [PATCH] Add modernize tool to Makefile --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index dc57050..bae5fcf 100644 --- a/Makefile +++ b/Makefile @@ -61,7 +61,7 @@ fmt: # gofumpt : # Enforce a stricter format than gofmt .PHONY: gofumpt -fmt: +gofumpt: $(GOBIN) install mvdan.cc/gofumpt@latest gofumpt -w $(GOSRC_COLLECTORS) gofumpt -w $(GOSRC_SINKS) @@ -75,6 +75,9 @@ fmt: vet: $(GOBIN) vet ./... +.PHONY: modernize +modernize: + $(GOBIN) run golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@latest ./... # Run linter for the Go programming language. # Using static analysis, it finds bugs and performance issues, offers simplifications, and enforces style rules