dev: rewrite linters Manager (#4419)

This commit is contained in:
Ludovic Fernandez 2024-03-02 21:43:28 +01:00 committed by GitHub
parent 26f8088b38
commit b14d05cdb4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 1749 additions and 1825 deletions

View file

@ -122,6 +122,16 @@ type Issues struct {
NeedFix bool `mapstructure:"fix"`
}
func (i *Issues) Validate() error {
for i, rule := range i.ExcludeRules {
if err := rule.Validate(); err != nil {
return fmt.Errorf("error in exclude rule #%d: %w", i, err)
}
}
return nil
}
type ExcludeRule struct {
BaseRule `mapstructure:",squash"`
}