Find infinite loops
ProprietaryMarks a while, do or for (;;) loop no path leaves: its condition is true, absent, or true on entry over literal-initialized locals never written, and no return, uncaught throw, break, labelled jump or finally leaves it. As in Sonar, a call that may throw or end the process is not a way out, and loops in a lambda, an initializer block or Thread#run are skipped. Unlike Sonar, a return, throw or break in a catch counts when its try holds a call. Also marks a for loop whose counter only moves away from its <, <=, > or >= end condition. Skips test sources.
io. moderne. staticanalysis. FindInfiniteLoopmod run . --recipe= io. moderne. staticanalysis. FindInfiniteLoopInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.