dev: enable errorlint linter (#4292)

This commit is contained in:
Oleksandr Redko 2024-01-02 16:33:00 +02:00 committed by GitHub
parent 0264eaa5c7
commit 85fb5a2493
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 36 additions and 31 deletions

View file

@ -139,16 +139,16 @@ type BaseRule struct {
func (b *BaseRule) Validate(minConditionsCount int) error {
if err := validateOptionalRegex(b.Path); err != nil {
return fmt.Errorf("invalid path regex: %v", err)
return fmt.Errorf("invalid path regex: %w", err)
}
if err := validateOptionalRegex(b.PathExcept); err != nil {
return fmt.Errorf("invalid path-except regex: %v", err)
return fmt.Errorf("invalid path-except regex: %w", err)
}
if err := validateOptionalRegex(b.Text); err != nil {
return fmt.Errorf("invalid text regex: %v", err)
return fmt.Errorf("invalid text regex: %w", err)
}
if err := validateOptionalRegex(b.Source); err != nil {
return fmt.Errorf("invalid source regex: %v", err)
return fmt.Errorf("invalid source regex: %w", err)
}
nonBlank := 0
if len(b.Linters) > 0 {