Optimize StringBuilder.Append usage
Recipe ID
OpenRewrite.Recipes.CSharp.CodeQuality.Performance.OptimizeStringBuilderAppendArtifactOpenRewrite.Recipes.CSharp.CodeQualityOptimize StringBuilder method calls: use char overloads for single-character strings, remove redundant ToString() calls, replace string.Format with AppendFormat, and split string concatenation into chained Append calls.
Single recipecsharpperformancecode-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.Performance.OptimizeStringBuilderAppendIf the recipe isn’t available locally, install it with:
mod config recipes nuget install OpenRewrite.Recipes.CSharp.CodeQuality