Convert while (true) with initial if break to loop condition

MSAL

Simplifies while (true) loops where the first statement is an if statement that only contains a break. The condition is inverted and moved to the loop condition for better readability.

org.openrewrite.staticanalysis.MoveConditionsToWhile
mod run . --recipe=org.openrewrite.staticanalysis.MoveConditionsToWhile

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.