SeverityLevelsConfiguration
public struct SeverityLevelsConfiguration<Parent> : RuleConfiguration, InlinableOptionType where Parent : Rule
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
warning
The threshold for a violation to be a warning.
error
The 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