mirror of
https://github.com/realm/SwiftLint.git
synced 2026-05-07 20:12:49 +00:00
6e3bfc1a45
These aren't enough to enable `-strict-concurrency=complete` for more modules, but they address some warnings with that flag on and reduces the scope of what remains to be migrated.
22 lines
915 B
Swift
22 lines
915 B
Swift
/// A value describing a SwiftLint violation that was corrected.
|
|
public struct Correction: Equatable, Sendable {
|
|
/// The description of the rule for which this correction was applied.
|
|
public let ruleDescription: RuleDescription
|
|
/// The location of the original violation that was corrected.
|
|
public let location: Location
|
|
|
|
/// The console-printable description for this correction.
|
|
public var consoleDescription: String {
|
|
return "\(location) Corrected \(ruleDescription.name)"
|
|
}
|
|
|
|
/// Memberwise initializer.
|
|
///
|
|
/// - parameter ruleDescription: The description of the rule for which this correction was applied.
|
|
/// - parameter location: The location of the original violation that was corrected.
|
|
public init(ruleDescription: RuleDescription, location: Location) {
|
|
self.ruleDescription = ruleDescription
|
|
self.location = location
|
|
}
|
|
}
|