1
0
mirror of https://github.com/mgechev/revive.git synced 2024-11-28 08:49:11 +02:00
Commit Graph

8 Commits

Author SHA1 Message Date
chavacava
579c7c761f utils.gofmt now accepts a interface{} 2020-05-08 22:08:16 +02:00
SalvadorC
da63d0a965 Refactors atomic rule code to move gofmt function to utils.go (issue #79) (#80)
* 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
2018-10-03 11:56:57 -07:00
mgechev
90f51530cc
Add white & black lists for var-naming
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
2018-09-15 15:05:31 -07:00
SalvadorC
771aa23069 bool-literal-in-expr (new rule) (#54)
* bool-literal-in-expr (new rule)

* bool-literal-in-expr: add test case and fix typo
2018-08-23 11:10:17 -07:00
chavacava
d95910df55 Refactoring: move pick function to rule/utils.go (#30)
* 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
2018-07-09 03:00:44 +10:00
mgechev
f35fad066d Add errorf rule 2018-01-25 10:42:39 -08:00
mgechev
f926547659 Refactoring 2018-01-24 15:44:03 -08:00
mgechev
98dce265c6 Refactoring 2018-01-21 18:04:41 -08:00