mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-08-28 22:28:43 -04:00
dev: enable errorlint linter (#4292)
This commit is contained in:
parent
0264eaa5c7
commit
85fb5a2493
14 changed files with 36 additions and 31 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue