aboutsummaryrefslogtreecommitdiffstats
path: root/tools/syz-linter
diff options
context:
space:
mode:
authorPaul Chaignon <paul.chaignon@gmail.com>2023-11-09 11:41:30 +0100
committerTaras Madan <tarasmadan@google.com>2023-11-09 11:41:36 +0000
commit047604c64a0ca5beed1a58d3a4da1dcfe827ac04 (patch)
treed16486240cad3bf8605a3e601f1f663e242d0d17 /tools/syz-linter
parent1d21e169f5af587e88b70ecd9640f8b33a76ebc5 (diff)
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 <paul.chaignon@gmail.com>
Diffstat (limited to 'tools/syz-linter')
-rw-r--r--tools/syz-linter/linter.go12
1 files changed, 3 insertions, 9 deletions
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{