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:
David Jennes
2020-08-12 22:52:00 +02:00
committed by GitHub
parent a84cd3d877
commit 19646bcddf
15 changed files with 95 additions and 48 deletions

View File

@@ -108,8 +108,8 @@ func indent(_ content: String, indentation: String, indentFirst: Bool) -> String
var lines = content.components(separatedBy: .newlines)
let firstLine = (indentFirst ? indentation : "") + lines.removeFirst()
let result = lines.reduce([firstLine]) { result, line in
result + [(line.isEmpty ? "" : "\(indentation)\(line)")]
let result = lines.reduce(into: [firstLine]) { result, line in
result.append(line.isEmpty ? "" : "\(indentation)\(line)")
}
return result.joined(separator: "\n")
}