From b11adfe6ba473acef74c186de68e00a7f3b453f9 Mon Sep 17 00:00:00 2001 From: JP Simard Date: Sun, 8 Apr 2018 10:55:58 -0700 Subject: [PATCH] compactMap --- Source/SwiftLintFramework/Rules/LowerACLThanBodyRule.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/SwiftLintFramework/Rules/LowerACLThanBodyRule.swift b/Source/SwiftLintFramework/Rules/LowerACLThanBodyRule.swift index 47ac0d7e8..beeb5dfb8 100644 --- a/Source/SwiftLintFramework/Rules/LowerACLThanBodyRule.swift +++ b/Source/SwiftLintFramework/Rules/LowerACLThanBodyRule.swift @@ -62,7 +62,7 @@ public struct LowerACLThanParentRule: OptInRule, ConfigurationProviderRule { violationOffset = element.offset } - return [violationOffset].flatMap { $0 } + self.validateACL(isHigherThan: accessibility, in: element) + return [violationOffset].compactMap { $0 } + self.validateACL(isHigherThan: accessibility, in: element) } } }