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:
committed by
GitHub
parent
d32d4a008f
commit
1bc57ac6f3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user