Control flow statement indentation

MSAL

Program flow control statements like if, while, and for can omit curly braces when they apply to only a single statement. This recipe ensures that any statements which follow that statement are correctly indented to show they are not part of the flow control statement. Misleading indentation can give the false impression that a line executes conditionally when it actually runs unconditionally, which is a common source of logic errors.

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

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