mirror of
https://github.com/realm/SwiftLint.git
synced 2026-06-06 20:18:40 +00:00
Fix #294
This commit is contained in:
@@ -83,7 +83,7 @@ func superfluousOrMissingParameterDocumentation(declaration: String, substructur
|
||||
$0["key.name"] as? String
|
||||
} ?? []
|
||||
let labelsAndParams = parameterNames.map { parameter -> (label: String, parameter: String) in
|
||||
let fullRange = NSRange(location: 0, length: Int(bodyOffset - offset))
|
||||
let fullRange = NSRange(location: 0, length: declaration.utf16.count)
|
||||
let firstMatch = regex("([^,\\s(]+)\\s+\(parameter)\\s*:")
|
||||
.firstMatchInString(declaration, options: [], range: fullRange)
|
||||
if let match = firstMatch {
|
||||
|
||||
Reference in New Issue
Block a user