1
0
mirror of https://github.com/mgechev/revive.git synced 2025-01-26 03:52:12 +02:00
revive/test/unused-receiver_test.go

16 lines
361 B
Go
Raw Normal View History

package test
import (
"testing"
"github.com/mgechev/revive/lint"
"github.com/mgechev/revive/rule"
)
func TestUnusedReceiver(t *testing.T) {
testRule(t, "unused-receiver", &rule.UnusedReceiverRule{})
testRule(t, "unused-receiver-custom-regex", &rule.UnusedReceiverRule{}, &lint.RuleConfig{Arguments: []any{
map[string]any{"allowRegex": "^xxx"},
}})
}