github.com/vanstinator/golangci-lint@v0.0.0-20240223191551-cc572f00d9d1/pkg/lint/linter/linter.go (about) 1 package linter 2 3 import ( 4 "context" 5 6 "golang.org/x/tools/go/analysis" 7 8 "github.com/vanstinator/golangci-lint/pkg/result" 9 ) 10 11 type Linter interface { 12 Run(ctx context.Context, lintCtx *Context) ([]result.Issue, error) 13 Name() string 14 Desc() string 15 } 16 17 type Noop struct { 18 name string 19 desc string 20 run func(pass *analysis.Pass) (any, error) 21 } 22 23 func (n Noop) Run(_ context.Context, lintCtx *Context) ([]result.Issue, error) { 24 lintCtx.Log.Warnf("%s is disabled because of generics."+ 25 " You can track the evolution of the generics support by following the https://github.com/vanstinator/golangci-lint/issues/2649.", n.name) 26 return nil, nil 27 } 28 29 func (n Noop) Name() string { 30 return n.name 31 } 32 33 func (n Noop) Desc() string { 34 return n.desc 35 }