Skip to content

Conversation

@stephentoub
Copy link
Member

From updates in dotnet/sdk#51215

Copilot AI review requested due to automatic review settings October 28, 2025 04:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses CA1830 code analyzer diagnostics by replacing inefficient new string(char, int) constructor calls with the more performant StringBuilder.Append(char, int) overload across multiple files in the codebase. This analyzer rule recommends using StringBuilder.Append(char, int) instead of creating temporary string objects when appending repeated characters.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/tools/illink/src/linker/Linker/Driver.cs Updated backslash appending in response file parsing to use the optimized Append overload
src/libraries/System.Text.RegularExpressions/src/System/Text/RegularExpressions/RegexNode.cs Modified indentation string building in ToString() to use the optimized Append overload
src/libraries/System.Text.Json/tests/System.Text.Json.Tests/Serialization/CustomConverterTests/CustomConverterTests.ReadAhead.cs Updated test string generation to use the optimized Append overload
src/coreclr/tools/Common/Compiler/ProcessLinkerXmlBase.cs Changed array rank comma separator generation to use the optimized Append overload
src/coreclr/tools/Common/Compiler/DisplayNameHelpers.cs Changed array rank comma separator generation to use the optimized Append overload

@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Oct 28, 2025
@dotnet-policy-service dotnet-policy-service bot added the linkable-framework Issues associated with delivering a linker friendly framework label Oct 28, 2025
@stephentoub
Copy link
Member Author

/ba-g wasm

@stephentoub stephentoub enabled auto-merge (squash) October 28, 2025 12:21
@stephentoub stephentoub merged commit 6445f5b into dotnet:main Oct 28, 2025
135 of 142 checks passed
@stephentoub stephentoub deleted the moreca1830 branch October 28, 2025 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

linkable-framework Issues associated with delivering a linker friendly framework needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants