Skip to content

Commit e698275

Browse files
committed
Use .enclosedArguments instead of filter
1 parent 5b160c3 commit e698275

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Source/SwiftLintFramework/Rules/ClosureBodyLengthRule.swift

+1-2
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ public struct ClosureBodyLengthRule: ASTRule, OptInRule, ConfigurationProviderRu
6464
let trailingClosures = dictionary.substructure
6565
.filter { $0.kind == StatementKind.brace.rawValue }
6666

67-
let closuresAsArgument = dictionary.substructure
68-
.filter { $0.kind == SwiftExpressionKind.argument.rawValue }
67+
let closuresAsArgument = dictionary.enclosedArguments
6968
.flatMap { $0.substructure.filter { $0.kind == StatementKind.brace.rawValue } }
7069

7170
return trailingClosures + closuresAsArgument

0 commit comments

Comments
 (0)