1
0
mirror of https://github.com/mgechev/revive.git synced 2025-02-11 13:38:40 +02:00
Euan Kemp af953e6189
Allow whitelist for the context parameter check (#616)
* 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>
2021-12-31 17:11:18 -08:00
..
2018-10-01 12:24:17 -07:00
2018-10-31 07:32:23 -07:00
2018-02-04 14:51:19 -08:00
2020-01-07 14:46:21 -08:00
2020-06-08 09:40:38 -07:00
2020-05-08 11:14:21 -07:00
2021-08-26 08:36:24 -07:00
2019-11-28 10:19:08 +07:00
2018-06-22 21:21:09 +10:00
2021-06-29 13:04:51 -07:00
2019-11-28 10:14:21 +07:00
2018-02-04 14:51:19 -08:00
2018-07-28 09:07:31 -07:00
2019-11-28 10:14:21 +07:00
2021-10-23 13:25:41 +02:00