2018-09-15 23:33:28 +02:00
|
|
|
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{
|
2023-09-24 08:44:02 +02:00
|
|
|
Arguments: []any{[]any{"ID"}, []any{"VM"}},
|
2018-09-15 23:33:28 +02:00
|
|
|
})
|
2022-01-18 16:26:29 +02:00
|
|
|
|
|
|
|
testRule(t, "var-naming_test", &rule.VarNamingRule{}, &lint.RuleConfig{})
|
2023-07-31 09:09:38 +02:00
|
|
|
|
|
|
|
testRule(t, "var-naming_upperCaseConst-false", &rule.VarNamingRule{}, &lint.RuleConfig{})
|
|
|
|
testRule(t, "var-naming_upperCaseConst-true", &rule.VarNamingRule{}, &lint.RuleConfig{
|
2023-09-24 08:44:02 +02:00
|
|
|
Arguments: []any{[]any{}, []any{}, []any{map[string]any{"upperCaseConst": true}}},
|
2023-07-31 09:09:38 +02:00
|
|
|
})
|
2018-09-15 23:33:28 +02:00
|
|
|
}
|