RuleIdentifier
public enum RuleIdentifier : Hashable, ExpressibleByStringLiteral, Comparable
An identifier representing a SwiftLint rule, or all rules.
-
Special identifier that should be treated as referring to ‘all’ SwiftLint rules. One helpful usecase is in disabling all SwiftLint rules in a given file by adding a
// swiftlint:disable all
comment at the top of the file.Declaration
Swift
case all
-
Represents a single SwiftLint rule with the specified identifier.
Declaration
Swift
case single(identifier: String)
-
The spelling of the string for this identifier.
Declaration
Swift
public var stringRepresentation: String { get }
-
Creates a
RuleIdentifier
by its string representation.Declaration
Swift
public init(_ value: String)
Parameters
value
The string representation.
-
Declaration
Swift
public init(stringLiteral value: String)
-
Declaration
Swift
public static func < (lhs: `Self`, rhs: `Self`) -> Bool