1
0
mirror of https://github.com/mgechev/revive.git synced 2025-03-31 21:55:29 +02:00
revive/test/context_as_argument_test.go
2024-11-11 19:31:18 +01:00

20 lines
393 B
Go

package test
import (
"testing"
"github.com/mgechev/revive/lint"
"github.com/mgechev/revive/rule"
)
func TestContextAsArgument(t *testing.T) {
testRule(t, "context_as_argument", &rule.ContextAsArgumentRule{}, &lint.RuleConfig{
Arguments: []any{
map[string]any{
"allowTypesBefore": "AllowedBeforeType,AllowedBeforeStruct,*AllowedBeforePtrStruct,*testing.T",
},
},
},
)
}