Convert 'if' to assignment
Recipe ID
OpenRewrite.Recipes.CSharp.CodeQuality.Simplification.ConvertIfToAssignmentArtifactOpenRewrite.Recipes.CSharp.CodeQualityConvert 'if' statement that assigns boolean literals to a simple assignment with the condition expression.
Single recipecsharpcode-qualityProprietary
Usage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe OpenRewrite.Recipes.CSharp.CodeQuality.Simplification.ConvertIfToAssignmentIf the recipe isn’t available locally, install it with:
mod config recipes nuget install OpenRewrite.Recipes.CSharp.CodeQuality