chore(lint): enable errcheck and fix test-file findings#1774
Conversation
Turn on errcheck in golangci and resolve the seventeen findings in test files: blank-assign fixture setup calls without a test handle in scope, and assert the ones that feed expected values or reset shared state. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Coverage Report for CI Build 29633761765Coverage remained the same at 46.11%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
Summary
Enable the
errchecklinter and fix the findings that live in test files. Final piece of the errcheck rollout.Depends on #1768, #1769, #1770, #1771, #1773 — the lint job stays red until they merge; this branch then gets rebased and marked ready.
Changes
errchecktolinters.enablein.golangci.ymlinternal/api/v1beta1connect/authenticate_test.go:_ =on 12 JWK fixture calls (notin scope inside the fixture closures);require.NoErroron thejson.Unmarshalthat builds an expected valueinternal/store/postgres/prospect_repository_test.go: assert the between-cases.cleanup()so a failed cleanup stops the suite at the real problempkg/server/webhook_bridge_test.go:_, _ =on two stub-handler writestest/e2e/regression/authentication_test.go:nolinton the callback server shutdown deferTest Plan
go test ./internal/api/v1beta1connect/ ./pkg/server/and the prospect suite passgolangci-lint runwith errcheck enabled reports zero findings in test files; the remaining findings are exactly the sites fixed by the five PRs above