Skip to content

Commit c3828f6

Browse files
committed
fix(SwiftComplexityCore): Skip protocolDecl in FunctionDetector.
1 parent bfe2ffb commit c3828f6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/SwiftComplexityCore/Analysis/FunctionDetector.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ class FunctionDetector: SyntaxVisitor {
2626
return detectedFunctions
2727
}
2828

29+
override func visit(_ node: ProtocolDeclSyntax) -> SyntaxVisitorContinueKind {
30+
return .skipChildren
31+
}
32+
2933
public override func visit(_ node: FunctionDeclSyntax) -> SyntaxVisitorContinueKind {
3034
let name = extractFunctionName(from: node)
3135
let signature = extractFunctionSignature(from: node)

0 commit comments

Comments
 (0)