mirror of
https://github.com/mgechev/revive.git
synced 2024-11-28 08:49:11 +02:00
20 lines
424 B
Go
20 lines
424 B
Go
package test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/mgechev/revive/lint"
|
|
"github.com/mgechev/revive/rule"
|
|
)
|
|
|
|
// TestStructTag tests struct-tag rule
|
|
func TestStructTag(t *testing.T) {
|
|
testRule(t, "struct-tag", &rule.StructTagRule{})
|
|
}
|
|
|
|
func TestStructTagWithUserOptions(t *testing.T) {
|
|
testRule(t, "struct-tag-useroptions", &rule.StructTagRule{}, &lint.RuleConfig{
|
|
Arguments: []any{"json,inline,outline", "bson,gnu"},
|
|
})
|
|
}
|