Skip to content

v0.10.1

Latest

Choose a tag to compare

@github-actions github-actions released this 08 Sep 18:06
· 4 commits to main since this release
v0.10.1

What's Changed

Fixes

  • Function literals that are guaranteed to run at most once no longer report a nested
    context. This covers the two common graceful-shutdown shapes reported in #101:

    defer func() {
        var cancel context.CancelFunc
        ctx, cancel = context.WithTimeout(context.WithoutCancel(ctx), time.Second)
        defer cancel()
        // [...]
    }()
    
    t.Cleanup(func() { /* idem */ })

    Recognized shapes are defer func() { ... }() and Cleanup calls on *testing.T,
    *testing.B or testing.TB. Registering such a literal inside a loop is still
    reported, since it then runs once per iteration and does grow the captured context
    (#101, #104).

No new option: existing configurations are unaffected, and the change only removes
reports.

Internal

  • Switch dependency updates from Dependabot to Renovate, on a monthly schedule.
  • Bump actions/setup-go to v7 and golangci-lint to v2.13.2.
  • Add contributing guidelines.

Full Changelog: v0.10.0...v0.10.1