lint: unify golangci-lint config and clear common/image/storage backlog #1383
All Vouch review confidence checks passed
Residual risk 0.31 = Change Risk (0.58) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.58 · 168 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.307
Sensitive Paths
sensitive_paths
0.058
Real PR Conversation Timeline
1 comments
"Review active on #1383"
general
weight: 0.35
mtrmac
Today each of common, image, and storage carried its own golangci-lint config. This PR replaces that with a single root
.golangci.yml(withrelative-path-mode: gitroot) and points Make/CI at it. With one policy in place, the rest of the PR clears the backlog that showed up under it: wrapping errors with%w, checking type assertions, renaming locals that shadowed predeclared names, and a handful of smaller cleanups (HTTP status constants, misspell, etc.). Where we cannot rename things without breaking public or ABI-facing names, we carve them out narrowly. For example ST1005 under image/, thecopypackage paths, storage ST1003, and intentional value/pointer Marshal receivers.Behavior
This is meant to be a lint cleanup, not a feature change. There are no public API signature changes.
A few places do change runtime details in small ways:
contextthrough layer commit / DiffID helpers instead ofcontext.Background().errors.Join, so both errors stay in the chain forerrors.Is/ unwrap.false).Normal Linux/Unix happy paths should behave the same.
Fixes: https://github.com/podman-container-tools/container-libs/issues/1358