chore: normalize .cs file encoding to UTF-8 BOM and apply code style cleanup#335
Merged
Conversation
…nfig/.gitattributes Add the UTF-8 BOM to 613 .cs files so all tracked .cs files are consistently UTF-8 with BOM and CRLF line endings. No content or line-ending changes - each file diff is only the BOM marker. Enforcement: - .editorconfig: charset = utf-8-bom for [*.cs] (git cannot enforce a BOM) - .gitattributes: *.cs text eol=crlf
🚀 Benchmark ResultsDetails
|
👽 Mutation ResultsaweXpect.ReflectionDetails
The final mutation score is 91.60%Coverage Thresholds: high:80 low:60 break:0 |
Forcing eol=crlf made raw string literals contain \r\n on Linux, while assertion messages are built with Environment.NewLine (\n there), failing ~2500 message-assertion tests on ubuntu CI.
|
|
This is addressed in release v2.0.0. |
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.



Normalizes all .cs files to a consistent encoding and applies a repo-wide code style cleanup. No behavioral changes — the public API and the test set are unchanged.
Fixes during stabilization
Native line endings for .cs checkouts: The normalization commit initially forced *.cs text eol=crlf in .gitattributes, which made Linux checkouts CRLF — raw string literals in tests then contained \r\n while assertion messages are built with Environment.NewLine (\n on Linux), failing ~2,500 message-assertion tests on ubuntu CI. Reverted to *.cs text: blobs stay LF-normalized, the
working tree uses platform-native line endings (CRLF on Windows, LF on Linux/macOS). A comment in .gitattributes documents why eol=crlf must not be used. The BOM rule is unaffected (git cannot enforce BOMs; that lives in .editorconfig).
Restored sealed modifiers: The cleanup pass stripped sealed from two overrides in TypeFilters.MemberAccess.Tests.cs despite a "do not remove" comment. Without the explicit modifier the compiler does not emit final, so MethodInfo.IsFinal is false and ShouldChainSealedBeforeMethods fails. Now guarded with // ReSharper disable SealedMemberInSealedClass so future cleanup passes keep them.
Native line endings for .cs checkouts: The normalization commit initially forced *.cs text eol=crlf in .gitattributes, which made Linux checkouts CRLF — raw string literals in tests then contained \r\n while assertion messages are built with Environment.NewLine (\n on Linux), failing ~2,500 message-assertion tests on ubuntu CI. Reverted to *.cs text: blobs stay LF-normalized, the working tree uses platform-native line endings (CRLF on Windows, LF on Linux/macOS). A comment in .gitattributes documents why eol=crlf must not be used. The BOM rule is unaffected (git cannot enforce BOMs; that lives in .editorconfig).
Restored sealed modifiers: The cleanup pass stripped sealed from two overrides in TypeFilters.MemberAccess.Tests.cs despite a "do not remove" comment. Without the explicit modifier the compiler does not emit final, so MethodInfo.IsFinal is false and ShouldChainSealedBeforeMethods fails. Now guarded with // ReSharper disable SealedMemberInSealedClass so future cleanup passes keep them.