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