Skip to content

Commit 1a0207b

Browse files
committed
use new plugin signature
1 parent 1b65795 commit 1a0207b

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

analyzer/plugin/plugin.go

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,8 @@ import (
99
"golang.org/x/tools/go/analysis"
1010
)
1111

12-
type analyzerPlugin struct{}
13-
14-
func (*analyzerPlugin) GetAnalyzers() []*analysis.Analyzer {
15-
return []*analysis.Analyzer{
16-
analyzer.New(),
17-
}
12+
func New(conf any) ([]*analysis.Analyzer, error) {
13+
// The configuration type will be map[string]any or []interface, it depends
14+
// on your configuration.
15+
return []*analysis.Analyzer{analyzer.New()}, nil
1816
}
19-
20-
var AnalyzerPlugin analyzerPlugin

0 commit comments

Comments
 (0)