for loop counters incremented in update

MSAL

The increment should be moved to the loop's increment clause if possible. Placing the counter update in the loop body rather than the update clause obscures the loop's control flow and makes it harder to reason about termination.

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

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