Simplify ternary expressions
MSALSimplifies various types of ternary expressions to improve code readability. Ternaries that simply select between true and false are redundant wrappers around the condition itself and add unnecessary complexity.
org. openrewrite. staticanalysis. SimplifyTernaryRecipesmod run . --recipe= org. openrewrite. staticanalysis. SimplifyTernaryRecipesInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.
Recipe list
It runs these recipes, in this order.