From db923a2c7c3bb14e8ae0a48f1fff7769939018af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sat, 14 Sep 2024 14:40:11 +0800 Subject: [PATCH] Fix linter configuration --- .golangci.yml | 20 ++++++++++++-------- tun_linux.go | 4 ++-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 7aa7aff..ea34b75 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -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" \ No newline at end of file diff --git a/tun_linux.go b/tun_linux.go index 6153abe..fd6fc66 100644 --- a/tun_linux.go +++ b/tun_linux.go @@ -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()