Skip to content

Reject carriage returns in verified files instead of normalizing#1762

Merged
SimonCropp merged 4 commits into
mainfrom
Reject-carriage-returns-in-verified-files-instead-of-normalizing
Jun 29, 2026
Merged

Reject carriage returns in verified files instead of normalizing#1762
SimonCropp merged 4 commits into
mainfrom
Reject-carriage-returns-in-verified-files-instead-of-normalizing

Conversation

@SimonCropp

Copy link
Copy Markdown
Member

No description provided.

The text comparison previously read the verified file via
ReadStringBuilderWithFixedLines, silently converting \r\n and \r to \n.
Now it reads the file directly and throws if it contains a \r, linking
to the text-file-settings docs. Verified files are LF-only (enforced by
.gitattributes), so this surfaces misconfigured line endings rather than
masking them.

Drop the now-unused ReadStringBuilderWithFixedLines(string) overload and
rewrite the two net9 NewLineTests to assert the throw.
@SimonCropp SimonCropp added this to the 31.21.0 milestone Jun 29, 2026
@SimonCropp SimonCropp merged commit 7253acb into main Jun 29, 2026
3 of 5 checks passed
@SimonCropp SimonCropp deleted the Reject-carriage-returns-in-verified-files-instead-of-normalizing branch June 29, 2026 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant