Fix linter configuration

This commit is contained in:
世界 2024-09-14 14:40:11 +08:00
parent aaaacba916
commit db923a2c7c
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
2 changed files with 14 additions and 10 deletions

View file

@ -3,18 +3,22 @@ linters:
enable:
- gofumpt
- govet
# - gci
- gci
- staticcheck
- paralleltest
- ineffassign
issues:
exclude-dirs:
- internal
linters-settings:
# gci:
# sections:
# - standard
# - prefix(github.com/sagernet/sing)
# - default
staticcheck:
go: '1.19'
gci:
custom-order: true
sections:
- standard
- prefix(github.com/sagernet/)
- default
run:
go: "1.23"

View file

@ -712,7 +712,7 @@ func (t *NativeTun) rules() []*netlink.Rule {
it.Family = unix.AF_INET
rules = append(rules, it)
}
priority++
// priority++
}
if p6 {
it = netlink.NewRule()
@ -755,7 +755,7 @@ func (t *NativeTun) rules() []*netlink.Rule {
it.Table = t.options.IPRoute2TableIndex
it.Family = unix.AF_INET6
rules = append(rules, it)
priority6++
// priority6++
}
if p4 {
it = netlink.NewRule()