A loop statement with at most one
iteration is equivalent to an if
statement; the following block is executed only once.
If the initial intention was to conditionally execute the block only once, an if
statement should be used instead. If that was not the
initial intention, the block of the loop should be fixed so the block is executed multiple times.
A loop statement with at most one iteration can happen when a statement unconditionally transfers control, such as a jump statement or a throw
statement, is misplaced inside the loop block.
This rule raises when the following statements are misplaced: