mirror of
https://github.com/realm/SwiftLint.git
synced 2026-06-06 20:18:40 +00:00
Fixed error in character limit per line.
This commit is contained in:
+2
-1
@@ -112,8 +112,9 @@ public struct UnneededParenthesesInClosureArgumentRule: ConfigurationProviderRul
|
||||
if let indexRange = correctedContents.nsrangeToIndexRange(violatingRange),
|
||||
let updatedRange = correctedContents.nsrangeToIndexRange(correctingRange) {
|
||||
let updatedArguments = correctedContents[updatedRange]
|
||||
let whiteSpaceOffset = violatingRange.location + violatingRange.length
|
||||
if let whiteSpaceIndex = correctedContents.index(correctedContents.startIndex,
|
||||
offsetBy: violatingRange.location + violatingRange.length,
|
||||
offsetBy: whiteSpaceOffset,
|
||||
limitedBy: correctedContents.endIndex),
|
||||
!String(correctedContents[whiteSpaceIndex]).hasTrailingWhitespace() {
|
||||
correctedContents.insert(" ", at: whiteSpaceIndex)
|
||||
|
||||
Reference in New Issue
Block a user