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
..
2021-10-23 13:25:41 +02:00
2021-10-23 13:25:41 +02:00
2020-05-08 11:14:21 -07:00
2021-09-26 08:28:58 +02:00
2021-10-23 13:25:41 +02:00
2021-10-17 21:12:36 +02:00
2020-05-08 22:43:14 +02:00
2021-06-29 21:40:40 +02:00
2021-10-23 13:25:41 +02:00
2021-10-23 13:25:41 +02:00
2020-02-26 10:32:47 -10:00
2018-09-29 07:04:10 +02:00
2021-10-23 13:25:41 +02:00
2021-10-01 13:55:53 +02:00
2021-08-16 12:15:17 +02:00