mirror of
https://github.com/realm/SwiftLint.git
synced 2026-05-07 20:12:49 +00:00
043f9cac5b
Start with a command that generates a template for a new SwiftSyntax rule. This tool could remain separate or be merged into the official binary under a `dev` sub-command at a later point in time.
15 lines
559 B
Swift
15 lines
559 B
Swift
/// The magnitude of a `StyleViolation`.
|
|
@AcceptableByConfigurationElement
|
|
public enum ViolationSeverity: String, Comparable, CaseIterable, Codable, Sendable, InlinableOptionType {
|
|
/// Non-fatal. If using SwiftLint as an Xcode build phase, Xcode will mark the build as having succeeded.
|
|
case warning
|
|
/// Fatal. If using SwiftLint as an Xcode build phase, Xcode will mark the build as having failed.
|
|
case error
|
|
|
|
// MARK: Comparable
|
|
|
|
public static func < (lhs: Self, rhs: Self) -> Bool {
|
|
lhs == .warning && rhs == .error
|
|
}
|
|
}
|