diff --git a/analyzer_test.go b/analyzer_test.go index 49e9c9b..8d23a37 100644 --- a/analyzer_test.go +++ b/analyzer_test.go @@ -17,13 +17,17 @@ func TestAnalyzer(t *testing.T) { settings: recvcheck.Settings{}, }, { - desc: "excluded", + desc: "builtin", settings: recvcheck.Settings{}, }, { desc: "disablebuiltin", settings: recvcheck.Settings{DisableBuiltin: true}, }, + { + desc: "exclusions", + settings: recvcheck.Settings{Exclusions: []string{"SQL.Value"}}, + }, } for _, test := range testCases { diff --git a/testdata/src/excluded/binary.go b/testdata/src/builtin/binary.go similarity index 91% rename from testdata/src/excluded/binary.go rename to testdata/src/builtin/binary.go index 0797251..4e40c4f 100644 --- a/testdata/src/excluded/binary.go +++ b/testdata/src/builtin/binary.go @@ -1,4 +1,4 @@ -package excluded +package builtin type Binary struct{} diff --git a/testdata/src/excluded/gob.go b/testdata/src/builtin/gob.go similarity index 90% rename from testdata/src/excluded/gob.go rename to testdata/src/builtin/gob.go index bd103ee..c9f6e78 100644 --- a/testdata/src/excluded/gob.go +++ b/testdata/src/builtin/gob.go @@ -1,4 +1,4 @@ -package excluded +package builtin type Gob struct{} diff --git a/testdata/src/excluded/json.go b/testdata/src/builtin/json.go similarity index 90% rename from testdata/src/excluded/json.go rename to testdata/src/builtin/json.go index 4e16f94..aafe379 100644 --- a/testdata/src/excluded/json.go +++ b/testdata/src/builtin/json.go @@ -1,4 +1,4 @@ -package excluded +package builtin type JSON struct{} diff --git a/testdata/src/excluded/text.go b/testdata/src/builtin/text.go similarity index 90% rename from testdata/src/excluded/text.go rename to testdata/src/builtin/text.go index 54db4de..c0cfea6 100644 --- a/testdata/src/excluded/text.go +++ b/testdata/src/builtin/text.go @@ -1,4 +1,4 @@ -package excluded +package builtin type Text struct{} diff --git a/testdata/src/excluded/xml.go b/testdata/src/builtin/xml.go similarity index 93% rename from testdata/src/excluded/xml.go rename to testdata/src/builtin/xml.go index d77325b..cea1492 100644 --- a/testdata/src/excluded/xml.go +++ b/testdata/src/builtin/xml.go @@ -1,4 +1,4 @@ -package excluded +package builtin import "encoding/xml" diff --git a/testdata/src/excluded/yaml.go b/testdata/src/builtin/yaml.go similarity index 91% rename from testdata/src/excluded/yaml.go rename to testdata/src/builtin/yaml.go index 1f2ceba..0d239e1 100644 --- a/testdata/src/excluded/yaml.go +++ b/testdata/src/builtin/yaml.go @@ -1,4 +1,4 @@ -package excluded +package builtin type Node struct{} diff --git a/testdata/src/exclusions/exclusions.go b/testdata/src/exclusions/exclusions.go new file mode 100644 index 0000000..771ac4b --- /dev/null +++ b/testdata/src/exclusions/exclusions.go @@ -0,0 +1,13 @@ +package exclusions + +import "database/sql/driver" + +type SQL struct{} + +func (s SQL) Value() (driver.Value, error) { + panic("not implemented") +} + +func (s *SQL) Scan(src any) error { + panic("not implemented") +}