Skip to content

[deep-report] Extend ctxbackground linter to flag bare exec.Command inside context-receiving functions #38143

Description

@github-actions

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 · ◷

  • expires on Jun 11, 2026, 7:52 AM UTC-08:00

Activity

  1. github-actions commented on Jun 9, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster selected this for Copilot

    I've identified this issue as a good candidate for automated resolution and requested assignment to the Copilot coding agent.

    If assignment succeeds, the Copilot coding agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    🍪 Om nom nom by Issue Monster · 20.5 AIC · ⌖ 8.88 AIC · ◷

  2. github-actions commented on Jun 11, 2026

    @github-actions
    ContributorAuthor

    This issue was automatically closed because it expired on 2026-06-11T15:52:28.063Z.

    Closed by Workflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions