Prefer while over for loops
MSALWhen only the condition expression is defined in a for loop, and the initialization and increment expressions are missing, a while loop should be used instead to increase readability. A for loop with empty init and update sections signals iteration mechanics that do not exist, whereas while clearly communicates a simple conditional loop.
org. openrewrite. staticanalysis. WhileInsteadOfFormod run . --recipe= org. openrewrite. staticanalysis. WhileInsteadOfForInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.