Skip to content

Commit a15d4fd

Browse files
committed
revert fmt changes
1 parent 81b6cff commit a15d4fd

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ 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]
4140

4241
DOCKER_IMAGE ?= gitea/gitea
4342
DOCKER_TAG ?= latest
@@ -248,7 +247,6 @@ fmt: ## format the Go code
248247
-e 's/{{[ ]\{1,\}/{{/g' -e '/^[ ]\{1,\}}}/! s/[ ]\{1,\}}}/}}/g' \
249248
-e 's/([ ]\{1,\}/(/g' -e '/^[ ]\{1,\})/! s/[ ]\{1,\})/)/g' \
250249
$(TEMPLATES)
251-
@$(GO) run $(GOPLS_MODERNIZE_PACKAGE) -fix ./...
252250

253251
.PHONY: fmt-check
254252
fmt-check: fmt
@@ -376,7 +374,7 @@ lint-go-vet: ## lint go files with vet
376374
.PHONY: lint-go-gopls
377375
lint-go-gopls: ## lint go files with gopls
378376
@echo "Running gopls..."
379-
@GO=$(GO) GOPLS_PACKAGE=$(GOPLS_PACKAGE) GOPLS_MODERNIZE_PACKAGE=$(GOPLS_MODERNIZE_PACKAGE) tools/lint-go-gopls.sh $(GO_SOURCES_NO_BINDATA)
377+
@GO=$(GO) GOPLS_PACKAGE=$(GOPLS_PACKAGE) tools/lint-go-gopls.sh $(GO_SOURCES_NO_BINDATA)
380378

381379
.PHONY: lint-editorconfig
382380
lint-editorconfig:

tools/lint-go-gopls.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ IGNORE_PATTERNS=(
1212
# because the tool does not set non-zero exit code when errors are found.
1313
# ref: https://github.com/golang/go/issues/67078
1414
ERROR_LINES="$("$GO" run "$GOPLS_PACKAGE" check "$@" 2>/dev/null | grep -E "^$PWD" | grep -vFf <(printf '%s\n' "${IGNORE_PATTERNS[@]}"))";
15-
ERROR_LINES="${ERROR_LINES}$("$GO" run "$GOPLS_MODERNIZE_PACKAGE" -fix ./...)"
1615

1716
NUM_ERRORS=$(echo -n "$ERROR_LINES" | wc -l)
1817

0 commit comments

Comments
 (0)