Replace custom Go formatter with golangci-lint fmt (#37194)

Use `golangci-lint fmt` to format code, replacing the previous custom
formatter tool. https://github.com/daixiang0/gci is used to order the
imports.

`make fmt` performs ~13% faster while consuming ~57% less cpu while
formatting for me.

`GOFUMPT_PACKAGE` is gone because it's using the builtin package from
golangci-lint.

Co-authored-by: Claude (claude-opus-4-6) <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
silverwind
2026-04-17 19:45:22 +02:00
committed by GitHub
parent 279bf84066
commit a9108ab6aa
23 changed files with 82 additions and 664 deletions

View File

@@ -122,7 +122,7 @@ jobs:
go-version-file: go.mod
check-latest: true
- run: make deps-backend deps-tools
- run: make lint-go-windows lint-go-gitea-vet
- run: make lint-go-windows
env:
TAGS: bindata sqlite sqlite_unlock_notify
GOOS: windows