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