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

fix: unconditional-recursion false positive when the function is called right after its declaration (#1212) (#1214)

This commit is contained in:
chavacava
2025-01-29 17:24:22 +01:00
committed by GitHub
parent 5f01efa722
commit 4bd6fbac97
2 changed files with 37 additions and 15 deletions

View File

@@ -199,3 +199,10 @@ func nr902() {
nr902() // MATCH /unconditional recursive call/
}()
}
// Test for issue #1212
func NewFactory() int {
return 0
}
var defaultFactory = NewFactory()