mirror of
https://github.com/mgechev/revive.git
synced 2024-11-21 17:16:40 +02:00
16 lines
361 B
Go
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"},
|
|
}})
|
|
}
|