Repository navigation
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() { ... }()andCleanupcalls on*testing.T,
*testing.Bortesting.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-goto v7 andgolangci-lintto v2.13.2. - Add contributing guidelines.
Full Changelog: v0.10.0...v0.10.1