Use StringBuilder.AppendLine

Proprietary

Replace sb.Append("\n") with sb.AppendLine().

OpenRewrite.Recipes.CSharp.CodeQuality.Performance.UseStringBuilderAppendLine
mod run . --recipe=OpenRewrite.Recipes.CSharp.CodeQuality.Performance.UseStringBuilderAppendLine

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