Skip to content

fix(pkg/paralleltestctx): detect helper-created timeout contexts#3

Merged
ethanndickson merged 2 commits into
mainfrom
recursive-rhs-timeout-context
May 14, 2026
Merged

fix(pkg/paralleltestctx): detect helper-created timeout contexts#3
ethanndickson merged 2 commits into
mainfrom
recursive-rhs-timeout-context

Conversation

@ethanndickson

@ethanndickson ethanndickson commented May 11, 2026

Copy link
Copy Markdown
Member

Summary

  • Detect timeout-context creation anywhere in assignment RHS expressions, not only the outermost call.
  • Summarize same-package test helpers that return context.Context from known timeout constructors, including simple helper chains, so calls like ctx := chatdTestContext(t) are linted.
  • Keep detection conservative by requiring context-typed assignments and scanning only test-file helpers in the analyzed package.
  • Add analyzer testdata for nested wrappers, helper chains, and non-context RHS false-positive coverage.

@ethanndickson ethanndickson changed the title fix(pkg/paralleltestctx): detect nested timeout context calls fix(pkg/paralleltestctx): detect helper-created timeout contexts May 11, 2026
@ethanndickson ethanndickson marked this pull request as ready for review May 11, 2026 05:51
@ethanndickson ethanndickson merged commit 5a14f9c into main May 14, 2026
3 checks passed
@ethanndickson ethanndickson deleted the recursive-rhs-timeout-context branch May 14, 2026 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants