mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-08-28 22:28:43 -04:00
dev: cleanup config package (#1929)
* split config section into files. * extract anonymous types. * sort linters alphabetically.
This commit is contained in:
parent
12e3251a61
commit
db80e16aba
10 changed files with 725 additions and 680 deletions
18
pkg/config/severity.go
Normal file
18
pkg/config/severity.go
Normal file
|
@ -0,0 +1,18 @@
|
|||
package config
|
||||
|
||||
const severityRuleMinConditionsCount = 1
|
||||
|
||||
type Severity struct {
|
||||
Default string `mapstructure:"default-severity"`
|
||||
CaseSensitive bool `mapstructure:"case-sensitive"`
|
||||
Rules []SeverityRule `mapstructure:"rules"`
|
||||
}
|
||||
|
||||
type SeverityRule struct {
|
||||
BaseRule `mapstructure:",squash"`
|
||||
Severity string
|
||||
}
|
||||
|
||||
func (s *SeverityRule) Validate() error {
|
||||
return s.BaseRule.Validate(severityRuleMinConditionsCount)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue