Skip to content

Commit 60a3bef

Browse files
Update Source/SwiftLintBuiltInRules/Rules/Lint/VariableShadowingRule.swift
Co-authored-by: Danny Mösch <danny.moesch@icloud.com>
1 parent f2e8966 commit 60a3bef

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Source/SwiftLintBuiltInRules/Rules/Lint/VariableShadowingRule.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ private extension VariableShadowingRule {
110110
}
111111

112112
private func isShadowingOuterScope(_ identifier: String) -> Bool {
113-
guard !scope.isEmpty, scope.count > 1 else { return false }
113+
guard scope.count > 1 else { return false }
114114

115115
// Use early exit and lazy evaluation for better performance
116116
for scopeDeclarations in scope.dropLast() where

0 commit comments

Comments
 (0)