github.com/vanstinator/golangci-lint@v0.0.0-20240223191551-cc572f00d9d1/pkg/result/processors/max_same_issues_test.go (about) 1 package processors 2 3 import ( 4 "testing" 5 6 "github.com/vanstinator/golangci-lint/pkg/config" 7 "github.com/vanstinator/golangci-lint/pkg/logutils" 8 "github.com/vanstinator/golangci-lint/pkg/result" 9 ) 10 11 func TestMaxSameIssues(t *testing.T) { 12 p := NewMaxSameIssues(1, logutils.NewStderrLog(logutils.DebugKeyEmpty), &config.Config{}) 13 i1 := result.Issue{ 14 Text: "1", 15 } 16 i2 := result.Issue{ 17 Text: "2", 18 } 19 20 processAssertSame(t, p, i1) // ok 21 processAssertSame(t, p, i2) // ok: another 22 processAssertEmpty(t, p, i1) // skip 23 }