From 7b00a110a073534dea3ac48f562ed1b4213cfefc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xaver=20Lohmu=CC=88ller?= Date: Thu, 10 Jan 2019 21:40:10 +0100 Subject: [PATCH] Fix line_length violation a different way --- .../Rules/Lint/IdenticalOperandsRule.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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