Skip to content

Commit b0458bf

Browse files
committed
run modernize as part of 'make fmt'
1 parent 3824eec commit b0458bf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ GO_LICENSES_PACKAGE ?= github.com/google/go-licenses@v1
3737
GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@v1
3838
ACTIONLINT_PACKAGE ?= github.com/rhysd/actionlint/cmd/actionlint@v1
3939
GOPLS_PACKAGE ?= golang.org/x/tools/[email protected]
40+
GOPLS_MODERNIZE_PACKAGE ?= golang.org/x/tools/gopls/internal/analysis/modernize/cmd/[email protected]
4041

4142
DOCKER_IMAGE ?= gitea/gitea
4243
DOCKER_TAG ?= latest
@@ -231,6 +232,7 @@ clean: ## delete backend and integration files
231232

232233
.PHONY: fmt
233234
fmt: ## format the Go code
235+
@$(GO) run $(GOPLS_MODERNIZE_PACKAGE) -fix ./...
234236
@GOFUMPT_PACKAGE=$(GOFUMPT_PACKAGE) $(GO) run build/code-batch-process.go gitea-fmt -w '{file-list}'
235237
$(eval TEMPLATES := $(shell find templates -type f -name '*.tmpl'))
236238
@# strip whitespace after '{{' or '(' and before '}}' or ')' unless there is only

0 commit comments

Comments
 (0)