diff --git a/.github/workflows/backend-ci.yml b/.github/workflows/backend-ci.yml index 0197647ea3..7367f680cf 100644 --- a/.github/workflows/backend-ci.yml +++ b/.github/workflows/backend-ci.yml @@ -79,7 +79,7 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v9 with: - version: v2.13 + version: v2.14.0 args: --timeout=30m working-directory: backend diff --git a/backend/.golangci.yml b/backend/.golangci.yml index 08d1b61f45..0ddcf5797e 100644 --- a/backend/.golangci.yml +++ b/backend/.golangci.yml @@ -123,6 +123,15 @@ linters: exclusions: rules: + # x/net v0.60 deprecated the HTTP/2 compatibility adapters. Keep their + # existing per-protocol idle timeout and PING configuration in this CI fix. + - path: 'internal/(repository/http_upstream(_http2_keepalive_test)?|server/http)\.go$' + linters: [ staticcheck ] + text: 'SA1019: (\(golang\.org/x/net/http2\.(Server|Transport)\)\.|golang\.org/x/net/http2\.(ConfigureServer|ConfigureTransports|Server|Transport)\b)' + # Upstream libraries can still return the legacy typed GOAWAY error. + - path: 'internal/service/openai_codex_models_service(_test)?\.go$' + linters: [ staticcheck ] + text: 'SA1019: golang\.org/x/net/http2\.GoAwayError\b' # G703/G704 污点分析在测试文件中只会命中 httptest mock 与测试者自设的 # 环境变量路径,不构成攻击面;且该分析跨环境结果不稳定(本地/CI 报告的 # 位置集合不同),逐点 nolint 无法收敛,故按路径豁免。生产代码不豁免,