diff --git a/Source/SwiftLintFramework/Rules/Lint/UnusedImportRule.swift b/Source/SwiftLintFramework/Rules/Lint/UnusedImportRule.swift index 36fb9f4cd..01fad41e2 100644 --- a/Source/SwiftLintFramework/Rules/Lint/UnusedImportRule.swift +++ b/Source/SwiftLintFramework/Rules/Lint/UnusedImportRule.swift @@ -197,7 +197,7 @@ private extension SwiftLintFile { return [] } - let operatorEntities = flatEntities(entity: index).filter { mightBeOperator(kind: $0.kind) } + let operatorEntities = flatEntities(entity: index) //.filter { mightBeOperator(kind: $0.kind) } let offsetPerLine = self.offsetPerLine() var imports = Set() @@ -209,7 +209,7 @@ private extension SwiftLintFile { let offset = lineOffset + column - 1 // Filter already processed tokens such as static methods that are not operators - guard !processedTokenOffsets.contains(ByteCount(offset)) else { continue } + // guard !processedTokenOffsets.contains(ByteCount(offset)) else { continue } let cursorInfoRequest = Request.cursorInfo(file: path!, offset: ByteCount(offset), arguments: arguments) guard let cursorInfo = (try? cursorInfoRequest.sendIfNotDisabled())