Ignore incorrect keypath parser diagnostics (#4325)

Works around https://github.com/apple/swift-syntax/issues/888
This commit is contained in:
JP Simard
2022-10-07 10:33:13 -04:00
committed by GitHub
parent f34169575c
commit 1a76a882ca
@@ -171,6 +171,10 @@ extension SwiftLintFile {
return ParseDiagnosticsGenerator.diagnostics(for: syntaxTree)
.filter { $0.diagMessage.severity == .error }
.map(\.message)
.filter { message in
// Workaround for https://github.com/apple/swift-syntax/issues/888
return !message.starts(with: "unexpected text '.?.")
}
}
internal var structure: Structure {