From 0056cdd5665f41175f0dfb2df978faa20355729d Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Wed, 22 Apr 2020 17:57:54 -0700 Subject: [PATCH] Remove @IBOutlet and @IBInspectable from UnusedDeclarationRule This list was intended to be things that could have side effects from being in IB, or just being dynamic, and therefore we cannot tell if they are used or not. In the case of the 2 attributes I'm removing, they could be used in IB, but if they aren't used in code, they should still be considered dead. --- .../SwiftLintFramework/Rules/Lint/UnusedDeclarationRule.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/SwiftLintFramework/Rules/Lint/UnusedDeclarationRule.swift b/Source/SwiftLintFramework/Rules/Lint/UnusedDeclarationRule.swift index 4f812fb131..649cb3813c 100644 --- a/Source/SwiftLintFramework/Rules/Lint/UnusedDeclarationRule.swift +++ b/Source/SwiftLintFramework/Rules/Lint/UnusedDeclarationRule.swift @@ -201,7 +201,7 @@ private extension SwiftLintFile { // Skip declarations marked as @IBOutlet, @IBAction or @objc // since those might not be referenced in code, but only dynamically (e.g. Interface Builder) if let annotatedDecl = cursorInfo.annotatedDeclaration, - ["@IBOutlet", "@IBAction", "@objc", "@IBInspectable"].contains(where: annotatedDecl.contains) { + ["@IBAction", "@objc"].contains(where: annotatedDecl.contains) { return nil }