* 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>
* Refactoring on atomic rule:
-Main modification: move func gofmt to utils.go
* Refactoring on constant-logical-expr rule
Simplifies equality check of subexpressions by using gofmt function
This PR introduces a white & black lists of initialisms for the
`var-naming` rule.
Now the rule can be configured with:
```toml
[rule.var-naming]
arguments = [["ID"], ["VM", "BAR"]]
```
This way, the linter will ignore `customId` but will throw on `customVm` or `customBar`.
Fix#41
* Adds rule superfluous-else (an extension of indent-error-flow)
* Fix superfluous-else rule struct namming.
* Adds superfuous-else rule to the rules table
* Adds confusing-naming rule
* adds multifile test
* [WIP] fix multiple file test
* draft solution for detecting confusing-names through multiple files
* [WIP] confusing-name multiple files
* clean-up
* draft working version
* cleaner version + more informative messages
* adds check on struct field names
* fix config.go
* clean master
* new ADS rule: newerr
* ADS-print working version
* ads-print final version
* ads-lost-err working version
* confusing-namming: fix tests
* moves pick to rule/utils for better reusability