SeverityConfiguration
public struct SeverityConfiguration<Parent> : SeverityBasedRuleConfiguration, InlinableOptionType where Parent : Rule
A rule configuration that allows specifying the desired severity level for violations.
-
Configuration with a warning severity.
Declaration
Swift
public static var error: `Self` { get }
-
Configuration with an error severity.
Declaration
Swift
public static var warning: `Self` { get }
-
Declaration
Swift
public var severityConfiguration: `Self` { get }
-
Create a
SeverityConfiguration
with the specified severity.Declaration
Swift
public init(_ severity: ViolationSeverity)
Parameters
severity
The severity that should be used when emitting violations.
-
Declaration
Swift
public mutating func apply(configuration: Any) throws
-
Severity configurations are special in that they shall not be nested when an option name is provided. Instead, their only option value must be used together with the option name.
Declaration
Swift
func asDescription(with key: String) -> RuleConfigurationDescription