mirror of
https://github.com/mgechev/revive.git
synced 2025-01-10 03:17:11 +02:00
90f51530cc
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
8 lines
144 B
Go
8 lines
144 B
Go
package fixtures
|
|
|
|
func foo() string {
|
|
customId := "result"
|
|
customVm := "result" // MATCH /var customVm should be customVM/
|
|
return customId
|
|
}
|