1
0
mirror of https://github.com/mgechev/revive.git synced 2024-11-24 08:32:22 +02:00
revive/test/unused_receiver_test.go
2024-11-11 19:31:18 +01:00

16 lines
361 B
Go

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"},
}})
}