[release/11.0] Detect all line endings in generated C# comments - #38858
Open
AndriySvyryd wants to merge 1 commit into
Open
[release/11.0] Detect all line endings in generated C# comments#38858AndriySvyryd wants to merge 1 commit into
AndriySvyryd wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
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.
SamMonoRT
approved these changes
Aug 24, 2026
artl93
approved these changes
Aug 24, 2026
artl93
left a comment
Member
There was a problem hiding this comment.
Customer reported. Quality / completeness. Approved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Updated
XmlCommentinCSharpHelperto 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.