Update SwiftLint to 0.39.2 (#295)
* Update SwiftLint to 0.39.2 * Enable a bunch of extra rules * Fix all warnings * Ignore this Xcode generated folder Co-authored-by: Olivier Halligon <olivier@halligon.net>
This commit is contained in:
@@ -55,7 +55,6 @@ public protocol ErrorReporter: AnyObject {
|
||||
}
|
||||
|
||||
open class SimpleErrorReporter: ErrorReporter {
|
||||
|
||||
open func renderError(_ error: Error) -> String {
|
||||
guard let templateError = error as? TemplateSyntaxError else { return error.localizedDescription }
|
||||
|
||||
@@ -74,10 +73,9 @@ open class SimpleErrorReporter: ErrorReporter {
|
||||
"""
|
||||
}
|
||||
|
||||
var descriptions = templateError.stackTrace.reduce([]) { $0 + [describe(token: $1)] }
|
||||
var descriptions = templateError.stackTrace.reduce(into: []) { $0.append(describe(token: $1)) }
|
||||
let description = templateError.token.map(describe(token:)) ?? templateError.reason
|
||||
descriptions.append(description)
|
||||
return descriptions.joined(separator: "\n")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user