SeverityLevelsConfiguration
public struct SeverityLevelsConfiguration<Parent> : RuleConfiguration, InlinableOptionType, Sendable where Parent : Rule
extension SeverityLevelsConfiguration: SeverityLevelsBasedRuleConfiguration
A rule configuration that allows specifying thresholds for warning and error severities.
-
The threshold for a violation to be a warning.
Declaration
Swift
@ConfigurationElement public var warning: Int { get set } -
The threshold for a violation to be an error.
Declaration
Swift
@ConfigurationElement public var error: Int? { get set } -
Declaration
Swift
public init(warning: Int, error: Int? = nil)Parameters
warningThe threshold for a violation to be a warning.
errorThe threshold for a violation to be an error.
-
The rule parameters that define the thresholds that should map to each severity.
Declaration
Swift
public var params: [RuleParameter<Int>] { get } -
Declaration
Swift
public mutating func apply(configuration: Any) throws(Issue) -
Declaration
Swift
public var severityConfiguration: SeverityLevelsConfiguration<Parent> { get }
View on GitHub
Install in Dash