1
0
mirror of https://github.com/mgechev/revive.git synced 2025-11-23 22:04:49 +02:00

refactor: replaces calls to astutils.PickNodes with calls to astutils.SeekNode when possible (#1482)

This commit is contained in:
chavacava
2025-08-23 17:41:10 +02:00
committed by GitHub
parent ccf85a25e5
commit cf4901574e
7 changed files with 58 additions and 17 deletions

View File

@@ -198,5 +198,5 @@ func (*lintUnconditionalRecursionRule) hasControlExit(node ast.Node) bool {
return false
}
return len(astutils.PickNodes(node, isExit)) != 0
return astutils.SeekNode[ast.Node](node, isExit) != nil
}