github.com/vanstinator/golangci-lint@v0.0.0-20240223191551-cc572f00d9d1/pkg/config/severity.go (about)

     1  package config
     2  
     3  const severityRuleMinConditionsCount = 1
     4  
     5  type Severity struct {
     6  	Default       string         `mapstructure:"default-severity"`
     7  	CaseSensitive bool           `mapstructure:"case-sensitive"`
     8  	Rules         []SeverityRule `mapstructure:"rules"`
     9  }
    10  
    11  type SeverityRule struct {
    12  	BaseRule `mapstructure:",squash"`
    13  	Severity string
    14  }
    15  
    16  func (s *SeverityRule) Validate() error {
    17  	return s.BaseRule.Validate(severityRuleMinConditionsCount)
    18  }