Update golangci-lint

This commit is contained in:
世界 2025-09-22 12:51:12 +08:00
parent 09d1d97313
commit b42efe2516
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
4 changed files with 59 additions and 32 deletions

View file

@ -1,20 +1,49 @@
linters:
disable-all: true
enable:
- gofumpt
- govet
- gci
- staticcheck
- paralleltest
- ineffassign
linters-settings:
gci:
custom-order: true
sections:
- standard
- prefix(github.com/sagernet/)
- default
version: "2"
run:
go: "1.23"
go: "1.25"
linters:
default: none
enable:
- govet
- ineffassign
- paralleltest
- staticcheck
settings:
staticcheck:
checks:
- all
- -S1000
- -S1008
- -S1017
- -ST1003
- -QF1001
- -QF1003
- -QF1008
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gci
- gofumpt
settings:
gci:
sections:
- standard
- prefix(github.com/sagernet/)
- default
custom-order: true
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$