feat: add musttag linter (#3386)

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
Tom 2023-01-21 16:36:35 +04:00 committed by GitHub
parent fb0866a8ba
commit 3cc6373117
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 126 additions and 0 deletions

View file

@ -179,6 +179,7 @@ type LintersSettings struct {
Makezero MakezeroSettings
Maligned MalignedSettings
Misspell MisspellSettings
MustTag MustTagSettings
Nakedret NakedretSettings
Nestif NestifSettings
NilNil NilNilSettings
@ -538,6 +539,14 @@ type MisspellSettings struct {
IgnoreWords []string `mapstructure:"ignore-words"`
}
type MustTagSettings struct {
Functions []struct {
Name string `mapstructure:"name"`
Tag string `mapstructure:"tag"`
ArgPos int `mapstructure:"arg-pos"`
} `mapstructure:"functions"`
}
type NakedretSettings struct {
MaxFuncLines int `mapstructure:"max-func-lines"`
}