Repository navigation
chore(lint): burn down 2,769 remaining non-errcheck golangci findings keeping Lint Code red #1342
Description
Activity
- addedtriagedItem has been triagedItem has been triagedpriority/p2Backlog-worthyBacklog-worthyseverity/mediumModerate harmModerate harmurgency/this-quarterWithin the quarterWithin the quarterimpact/internalTeam-internal onlyTeam-internal onlyeffort/lWeeksWeekstype/choreMaintenance / non-user-visibleMaintenance / non-user-visible
on Jul 3, 2026 Scope addition discovered during LeanerCloud/cloud-commitments-go#27 phase-2 work: the providers/aws module carries its own golangci debt - 134 issues in providers/aws/recommendations alone (misspell 57, godot 28, gocritic 24, govet ~17, staticcheck 1, plus a few others). Two specific items worth calling out for the batch fix: (1) the lenient parseFloat in recommendations/utilization.go silently returns 0 with a warning on unparseable CE numbers - a no-silent-fallback violation on a money path; the new strict parseSPFloat in sp_coverage.go is the pattern to migrate call sites to. (2) recommendations now has four near-identical rate-limited retry wrappers (fetchCoveragePage, fetchUtilizationPage, fetchSPCoveragePage, fetchSPUtilizationPage) - extract a generic fetchWithRetry helper as part of the cleanup. Note CI currently lints only the root module, so this debt is invisible to the gate; the burn-down should either extend CI to all modules or note why not.
Closing as resolved, not splitting into per-repo issues.
This issue was filed to track "2,769 remaining non-errcheck golangci findings keeping Lint Code red" repo-wide. That problem is fixed: PR #1364 ("chore(lint): clear all golangci-lint findings to green", merged 2026-07-16) cleared all findings, and two prior comments on this issue (2026-07-16, 2026-07-27) already recommended closing it as resolved. Re-verified live just now:
gh run list -R LeanerCloud/cloud-commitments-cli --branch mainshows the CI workflow (which includes the "Lint Code" job) green on the latest run againstmainas of 2026-09-27T20:57Z. Given that, filing "burn down 2,769 findings, Lint Code red" issues into the other three post-split repos would put stale, false information into their trackers, so I'm not doing that.There is one genuine residual gap, called out in the third comment on this issue:
providers/awsis its own Go module (separatego.mod), andgolangci-lint-actioninci.ymlonly lints the root module, so debt inproviders/awsis invisible to the "Lint Code" gate that this issue's fix made green. That module now lives incloud-commitments-go, so I've filed a focused follow-up there instead of a monorepo-wide sibling: LeanerCloud/cloud-commitments-go#120. The fieldalignment re-enable follow-up mentioned in the resolution comments is already tracked separately at #1373 and is out of scope here.
Follow-up to #1339. After the errcheck wave is fixed (branch
fix/ci-main-red, errcheck now 0), the CI "Lint Code" job will still be red: 2,769 non-errcheck findings remain repo-wide under the strict.golangci.ymlv2 config that landed 2026-06-09 (commit b54f06d), which is what turned main's CI red on 2026-06-11.Breakdown (local run, golangci-lint 2.11.4; counts match live CI run 28541474929 annotations almost exactly, small govet/gosec deltas likely from the CI-pinned 2.10.1):
Per the no-masking-CI-debt directive: fix for real in batches (per-linter batch PRs work well; godot and fieldalignment are highly mechanical), no
only-new-issues, no blanket nolint. Suggest sequence: gosec + errorlint + noctx first (correctness/security value), then staticcheck/unparam/gocritic, then the mechanical godot/misspell/fieldalignment sweeps.Also noted while in there: the "Security Scanning" job failure on main should clear once the pgx v5.9.2 bump from #1339 merges; re-check after merge for any additional CVEs.