From 047604c64a0ca5beed1a58d3a4da1dcfe827ac04 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Thu, 9 Nov 2023 11:41:30 +0100 Subject: tools/syz-linter: fix golangci-lint plugin signature This commit address the following warning: WARN plugin: 'AnalyzerPlugin' plugins are deprecated, please use the new plugin signature: https://golangci-lint.run/contributing/new-linters/#create-a-plugin Signed-off-by: Paul Chaignon --- tools/syz-linter/linter.go | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'tools') diff --git a/tools/syz-linter/linter.go b/tools/syz-linter/linter.go index c92e7bb88..d0cd0879b 100644 --- a/tools/syz-linter/linter.go +++ b/tools/syz-linter/linter.go @@ -32,15 +32,9 @@ import ( "golang.org/x/tools/go/analysis/passes/structtag" ) -var AnalyzerPlugin analyzerPlugin +func main() {} -type analyzerPlugin struct{} - -func main() { - _ = AnalyzerPlugin -} - -func (*analyzerPlugin) GetAnalyzers() []*analysis.Analyzer { +func New(conf any) ([]*analysis.Analyzer, error) { return []*analysis.Analyzer{ SyzAnalyzer, // Some standard analyzers that are not enabled in vet. @@ -49,7 +43,7 @@ func (*analyzerPlugin) GetAnalyzers() []*analysis.Analyzer { deepequalerrors.Analyzer, nilness.Analyzer, structtag.Analyzer, - } + }, nil } var SyzAnalyzer = &analysis.Analyzer{ -- cgit mrf-deployment