github.com/ldez/golangci-lint@v1.10.1/pkg/result/processors/cgo.go (about) 1 package processors 2 3 import ( 4 "github.com/golangci/golangci-lint/pkg/goutils" 5 "github.com/golangci/golangci-lint/pkg/result" 6 ) 7 8 type Cgo struct { 9 } 10 11 var _ Processor = Cgo{} 12 13 func NewCgo() *Cgo { 14 return &Cgo{} 15 } 16 17 func (p Cgo) Name() string { 18 return "cgo" 19 } 20 21 func (p Cgo) Process(issues []result.Issue) ([]result.Issue, error) { 22 return filterIssues(issues, func(i *result.Issue) bool { 23 // some linters (.e.g gas, deadcode) return incorrect filepaths for cgo issues, 24 // it breaks next processing, so skip them 25 return !goutils.IsCgoFilename(i.FilePath()) 26 }), nil 27 } 28 29 func (Cgo) Finish() {}