Merge if with parent if

Proprietary

Merge if (a) { if (b) { ... } } into if (a && b) { ... } when the outer if body contains only a single nested if without else.

OpenRewrite.Recipes.CSharp.CodeQuality.Simplification.MergeIfWithParentIf
mod run . --recipe=OpenRewrite.Recipes.CSharp.CodeQuality.Simplification.MergeIfWithParentIf

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