1
0
mirror of https://github.com/mgechev/revive.git synced 2025-11-25 22:12:38 +02:00

feature(deep-exit): detect exit-triggering flag usage (#1544)

This commit is contained in:
Godsgift Uloamaka Ebite
2025-10-23 15:17:59 +01:00
committed by GitHub
parent d32d4a008f
commit 1bc57ac6f3
7 changed files with 90 additions and 29 deletions

View File

@@ -190,9 +190,7 @@ func (*lintUnconditionalRecursionRule) hasControlExit(node ast.Node) bool {
functionName := se.Sel.Name
pkgName := id.Name
if isCallToExitFunction(pkgName, functionName) {
return true
}
return isCallToExitFunction(pkgName, functionName, n.Args)
}
return false