mirror of
https://github.com/mgechev/revive.git
synced 2025-01-26 03:52:12 +02:00
af953e6189
* Allow a whitelist for the context parameter check This allows users to configure a set of types that may appear before `context.Context`. Notably, I think this rule is useful for allowing the `*testing.T` type to come before `context.Context`, though there may be other uses (such as putting a tracer before it, etc). See #605 for a little more context on this. Fixes #605 * Save a level of indentation in context-as-arg validation We can unindent if we make the above check more specific * refactoring taking into account chavacava's review Co-authored-by: chavacava <salvadorcavadini+github@gmail.com>