Ternary operators should not be nested

MSAL

Nested ternary operators can be hard to read quickly. Prefer simpler constructs for improved readability. If supported, this recipe will try to replace nested ternaries with switch expressions. Deeply nested conditional expressions obscure the branching logic and make it easy to misread which value corresponds to which condition.

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

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