Description
The ctxbackground linter currently flags only context.Background() misuse. It does not flag bare exec.Command(...) calls made inside functions that already receive a context.Context parameter — which is exactly how the context-propagation debt keeps growing (109 bare exec.Command vs 24 exec.CommandContext, 0 progress since 2026-06-03). Extend the linter (or add a sibling analyzer) to report exec.Command invoked within a context-receiving function and suggest exec.CommandContext(ctx, ...). Use pass.TypesInfo for type-accurate matching, consistent with the other 22 custom analyzers.
Expected Impact
Turns a recurring, manually-tracked debt into an automatically-enforced rule, preventing new un-cancellable subprocess spawns from landing. High leverage: stops the regression at the source rather than chasing 32 files by hand.
Suggested Agent
copilot-swe-agent (linter work; follows the existing cmd/linters / pkg/linters analyzer pattern).
Estimated Effort
Medium (1-4 hours).
Data Source
DeepReport 2026-06-09 analysis — Repository Quality: Context Propagation & Process Cancellability (#38123).
Generated by 🔬 DeepReport - Intelligence Gathering Agent · 277.3 AIC · ⌖ 18.6 AIC · ⊞ 10.6K · ◷
Description
The
ctxbackgroundlinter currently flags onlycontext.Background()misuse. It does not flag bareexec.Command(...)calls made inside functions that already receive acontext.Contextparameter — which is exactly how the context-propagation debt keeps growing (109 bareexec.Commandvs 24exec.CommandContext, 0 progress since 2026-06-03). Extend the linter (or add a sibling analyzer) to reportexec.Commandinvoked within a context-receiving function and suggestexec.CommandContext(ctx, ...). Usepass.TypesInfofor type-accurate matching, consistent with the other 22 custom analyzers.Expected Impact
Turns a recurring, manually-tracked debt into an automatically-enforced rule, preventing new un-cancellable subprocess spawns from landing. High leverage: stops the regression at the source rather than chasing 32 files by hand.
Suggested Agent
copilot-swe-agent (linter work; follows the existing
cmd/linters/pkg/lintersanalyzer pattern).Estimated Effort
Medium (1-4 hours).
Data Source
DeepReport 2026-06-09 analysis — Repository Quality: Context Propagation & Process Cancellability (#38123).