diff --git a/Source/SwiftLintFramework/Rules/Lint/IdenticalOperandsRule.swift b/Source/SwiftLintFramework/Rules/Lint/IdenticalOperandsRule.swift index 5f899beef..c8cf32e9b 100644 --- a/Source/SwiftLintFramework/Rules/Lint/IdenticalOperandsRule.swift +++ b/Source/SwiftLintFramework/Rules/Lint/IdenticalOperandsRule.swift @@ -46,8 +46,9 @@ public struct IdenticalOperandsRule: ConfigurationProviderRule, OptInRule, Autom public func validate(file: File) -> [StyleViolation] { let operators = type(of: self).operators.joined(separator: "|") - let pattern = "(?|\\<))" + let pattern = """ + (?|\\<)) + """ let syntaxKinds = SyntaxKind.commentKinds let excludingPattern = "\\?\\?\\s*" + pattern