mirror of
https://github.com/mgechev/revive.git
synced 2025-07-05 00:28:53 +02:00
docs: improve comments for functions; enable godot (#1382)
This commit is contained in:
@ -79,10 +79,10 @@ type lintUnconditionalRecursionRule struct {
|
||||
}
|
||||
|
||||
// Visit will traverse function's body we search for calls to the function itself.
|
||||
// We do not search inside conditional control structures (if, for, switch, ...) because any recursive call inside them is conditioned
|
||||
// We do search inside conditional control structures are statements that will take the control out of the function (return, exit, panic)
|
||||
// If we find conditional control exits, it means the function is NOT unconditionally-recursive
|
||||
// If we find a recursive call before finding any conditional exit, a failure is generated
|
||||
// We do not search inside conditional control structures (if, for, switch, ...) because any recursive call inside them is conditioned.
|
||||
// We do search inside conditional control structures are statements that will take the control out of the function (return, exit, panic).
|
||||
// If we find conditional control exits, it means the function is NOT unconditionally-recursive.
|
||||
// If we find a recursive call before finding any conditional exit, a failure is generated.
|
||||
// In resume: if we found a recursive call control-dependent from the entry point of the function then we raise a failure.
|
||||
func (w *lintUnconditionalRecursionRule) Visit(node ast.Node) ast.Visitor {
|
||||
switch n := node.(type) {
|
||||
|
Reference in New Issue
Block a user