A loop has more exits and restarts than the limit allows
What it finds
A loop left or restarted from many places through break and continue has many paths to follow, and its condition no longer tells when it ends.
Counted are the break and continue statements that act on the loop itself: those without a label whose nearest loop or switch is this loop (a break in a switch leaves the switch), and those with the loop's label. A loop with more than the parameter max, 2 by default, is reported.
From the rule's source, loop_exits.rs.
Turn it on, off or suppress it
The rule runs from the strict tier up. To turn it on in a lower tier, give it a level in tx0.toml:
[rules]
"tx0/java:many-loop-jumps" = "warning"To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:
// tx0: ignore[tx0/java:many-loop-jumps] reason="..."tx0 explain tx0/java:many-loop-jumps shows the same in the terminal. Found a false positive? Report it.