1
0
mirror of https://github.com/mgechev/revive.git synced 2024-11-28 08:49:11 +02:00
revive/testdata/golint
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
..
blank-import-lib.go Ignore blank import of embed if embed is actually used in the file (#501) 2021-03-06 14:04:57 +01:00
blank-import-with-embed.go Ignore blank import of embed if embed is actually used in the file (#501) 2021-03-06 14:04:57 +01:00
const-block.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
context-keys-type.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
docs_test.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
error-naming.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
error-return.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
error-strings-pkg-errors.go Update error-strings rule (#608) (#609) 2021-10-28 21:26:02 +02:00
error-strings.go Fix package check in error-strings rule (#610) (#611) 2021-10-30 08:45:37 +02:00
errorf.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
exported.go Exported config (#565) 2021-08-26 08:36:24 -07:00
import-dot.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
increment-decrement.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
indent-error-flow.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
package-doc1.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
package-doc2.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
package-doc3.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
package-doc4.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
package-doc5.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
package-main.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
range.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
receiver-naming.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
sort.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
stutter.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
time-naming.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
unexported-return.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
value-spec.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
var-declaration.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
var-naming.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00