1
0
mirror of https://github.com/mgechev/revive.git synced 2024-11-28 08:49:11 +02:00
revive/test/var-naming_test.go

22 lines
606 B
Go
Raw Normal View History

package test
import (
"testing"
"github.com/mgechev/revive/lint"
"github.com/mgechev/revive/rule"
)
func TestVarNaming(t *testing.T) {
testRule(t, "var-naming", &rule.VarNamingRule{}, &lint.RuleConfig{
Arguments: []any{[]any{"ID"}, []any{"VM"}},
})
testRule(t, "var-naming_test", &rule.VarNamingRule{}, &lint.RuleConfig{})
testRule(t, "var-naming_upperCaseConst-false", &rule.VarNamingRule{}, &lint.RuleConfig{})
testRule(t, "var-naming_upperCaseConst-true", &rule.VarNamingRule{}, &lint.RuleConfig{
Arguments: []any{[]any{}, []any{}, []any{map[string]any{"upperCaseConst": true}}},
})
}