Skip to content

[release/11.0] Detect all line endings in generated C# comments - #38858

Open
AndriySvyryd wants to merge 1 commit into
release/11.0from
ScaffoldComments
Open

[release/11.0] Detect all line endings in generated C# comments#38858
AndriySvyryd wants to merge 1 commit into
release/11.0from
ScaffoldComments

Conversation

@AndriySvyryd

@AndriySvyryd AndriySvyryd commented Aug 24, 2026

Copy link
Copy Markdown
Member

Description
Updated XmlComment in CSharpHelper to split input text on all Unicode line terminators, including \u0085, \u2028, and \u2029, in addition to the standard ones.

Customer impact
If the target database contains comments with these characters, then in the scaffolded they won't be escaped correctly

How found
User reported on 11.0 preview-7.

Regression
No

Testing
Tests added.

Risk
Very low.

@AndriySvyryd
AndriySvyryd requested a lite review from Copilot August 24, 2026 19:29
@AndriySvyryd
AndriySvyryd requested a review from a team as a code owner August 24, 2026 19:29
@AndriySvyryd AndriySvyryd changed the title Detect all line endings in generated C# comments [release/11.0] Detect all line endings in generated C# comments Aug 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown

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 updates EF Core’s CSharpHelper.XmlComment generation so it correctly splits multi-line comment input on all Unicode line terminators (CRLF/CR/LF plus NEL \u0085, LS \u2028, PS \u2029), ensuring consistent XML comment output when input comes from varied sources.

Changes:

  • Expand XmlComment’s line-splitting separators to include \u0085, \u2028, and \u2029.
  • Add a design-time unit test validating correct handling/normalization of all supported line terminators.

Reviewed changes

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

File Description
test/EFCore.Design.Tests/Design/Internal/CSharpHelperTest.cs Adds a test covering CRLF/CR/LF and Unicode line terminators for XmlComment.
src/EFCore.Design/Design/Internal/CSharpHelper.cs Updates XmlComment to split on additional Unicode line separators.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@AndriySvyryd
AndriySvyryd requested a review from artl93 August 24, 2026 20:16

@artl93 artl93 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Customer reported. Quality / completeness. Approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants