mirror of
https://github.com/mgechev/revive.git
synced 2025-11-25 22:12:38 +02:00
unused-param,unused-receiver: refactor configure func (#1157)
This commit is contained in:
@@ -9,6 +9,10 @@ import (
|
||||
|
||||
func TestUnusedParam(t *testing.T) {
|
||||
testRule(t, "unused_param", &rule.UnusedParamRule{})
|
||||
testRule(t, "unused_param", &rule.UnusedParamRule{}, &lint.RuleConfig{Arguments: []any{}})
|
||||
testRule(t, "unused_param", &rule.UnusedParamRule{}, &lint.RuleConfig{Arguments: []any{
|
||||
map[string]any{"a": "^xxx"},
|
||||
}})
|
||||
testRule(t, "unused_param_custom_regex", &rule.UnusedParamRule{}, &lint.RuleConfig{Arguments: []any{
|
||||
map[string]any{"allowRegex": "^xxx"},
|
||||
}})
|
||||
|
||||
Reference in New Issue
Block a user