mirror of
https://github.com/realm/SwiftLint.git
synced 2026-06-06 20:18:40 +00:00
Fixed return lines.
This commit is contained in:
@@ -37,6 +37,7 @@ public struct TrailingCommaRule: ASTRule, CorrectableRule, ConfigurationProvider
|
||||
// https://bugs.swift.org/browse/SR-3449
|
||||
result.append("let foo = [\"אבג\", \"αβγ\", \"🇺🇸\"↓,]\n")
|
||||
#endif
|
||||
return result
|
||||
}()
|
||||
private static let corrections: [String: String] = {
|
||||
let fixed = triggeringExamples.map { $0.replacingOccurrences(of: "↓,", with: "") }
|
||||
@@ -44,6 +45,7 @@ public struct TrailingCommaRule: ASTRule, CorrectableRule, ConfigurationProvider
|
||||
for (triggering, correction) in zip(triggeringExamples, fixed) {
|
||||
result[triggering] = correction
|
||||
}
|
||||
return result
|
||||
}()
|
||||
|
||||
public static let description = RuleDescription(
|
||||
|
||||
@@ -39,6 +39,7 @@ class TrailingCommaRuleTests: XCTestCase {
|
||||
// https://bugs.swift.org/browse/SR-3449
|
||||
result.append("let foo = [\"אבג\", \"αβγ\",\n\"🇺🇸\"↓]\n")
|
||||
#endif
|
||||
return result
|
||||
}()
|
||||
private static let corrections: [String: String] = {
|
||||
let fixed = triggeringExamples.map { $0.replacingOccurrences(of: "↓", with: ",") }
|
||||
@@ -46,6 +47,7 @@ class TrailingCommaRuleTests: XCTestCase {
|
||||
for (triggering, correction) in zip(triggeringExamples, fixed) {
|
||||
result[triggering] = correction
|
||||
}
|
||||
return result
|
||||
}()
|
||||
private let mandatoryCommaRuleDescription = RuleDescription(
|
||||
identifier: TrailingCommaRule.description.identifier,
|
||||
|
||||
Reference in New Issue
Block a user