dev: use zerologlint analyzer fields for name and doc (#4225)

This commit is contained in:
Oleksandr Redko 2023-11-29 19:26:42 +02:00 committed by GitHub
parent e32f2f3f8d
commit 185b2c77bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,10 +8,12 @@ import (
)
func NewZerologLint() *goanalysis.Linter {
a := zerologlint.Analyzer
return goanalysis.NewLinter(
"zerologlint",
"Detects the wrong usage of `zerolog` that a user forgets to dispatch with `Send` or `Msg`.",
[]*analysis.Analyzer{zerologlint.Analyzer},
a.Name,
a.Doc,
[]*analysis.Analyzer{a},
nil,
).WithLoadMode(goanalysis.LoadModeTypesInfo)
}