diff --git a/Makefile b/Makefile index 773462516cd..b4c52f90aad 100644 --- a/Makefile +++ b/Makefile @@ -126,7 +126,7 @@ GOVOLUMES= -v $(shell pwd)/.cache:/go/cache:delegated,z \ -v $(shell pwd)/.pkg:/go/pkg:delegated,z \ -v $(shell pwd):/go/src/github.com/cortexproject/cortex:delegated,z -exes $(EXES) protos $(PROTO_GOS) lint test cover shell mod-check check-protos web-build web-pre web-deploy doc check-modernize: build-image/$(UPTODATE) +exes $(EXES) protos $(PROTO_GOS) lint test cover shell mod-check check-protos web-build web-pre web-deploy doc modernize: build-image/$(UPTODATE) @mkdir -p $(shell pwd)/.pkg @mkdir -p $(shell pwd)/.cache @echo @@ -251,6 +251,9 @@ web-build: web-pre web-deploy: ./tools/website/web-deploy.sh +modernize: + go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@v0.20.0 -fix ./... + # Generates the config file documentation. doc: clean-doc go run -tags slicelabels ./tools/doc-generator ./docs/configuration/config-file-reference.template > ./docs/configuration/config-file-reference.md @@ -308,9 +311,6 @@ clean-white-noise: check-white-noise: clean-white-noise @git diff --exit-code --quiet -- '*.md' || (echo "Please remove trailing whitespaces running 'make clean-white-noise'" && false) -modernize: - go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@v0.20.0 -fix ./... - check-modernize: modernize @git diff --exit-code -- . || (echo "Please modernize running 'make modernize'" && false)