Last published: September 24, 2026
KT.UNCONDITIONAL_JUMP_STATEMENT_IN_LOOP
Loops contains jump statements that jump regardless of any conditions
Reports loops which contain jump statements that jump regardless of any conditions. This implies that the loop is only executed once and thus could be rewritten without a loop altogether.
Noncompliant Code
Compliant Code
Copy
for (i in 1..2) {
if (i == 1) break
}