1
0
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:
Oleksandr Redko
2025-05-27 08:44:24 +03:00
committed by GitHub
parent 398f7a83eb
commit f4976873e7
49 changed files with 135 additions and 132 deletions

View File

@ -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) {