-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code Health | Enforcing Ordinal for StringComparison #2068
Conversation
I was just going to ask if there were other potential relevant changes - LGTM |
Looks like a good idea to me. |
To add background for anyone investigating this in the future: In a library like MDS, almost all string comparison operations being done inside the library should not use culture comparison rules (they should use Ordinal). For example, if we are parsing a connection string, we are looking for specific characters, not culture-specific representations of them. For example, if we are looking for a comma (also a thousands separator in some languages), we only want to find a comma, not a period (also a thousands separator in some languages). Default string comparison operations in .NET are culture specific. To be safe, we should always be explicit with which option we want to use inside MDS. |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #2068 +/- ##
==========================================
- Coverage 70.79% 70.61% -0.19%
==========================================
Files 305 305
Lines 61819 61819
==========================================
- Hits 43764 43652 -112
- Misses 18055 18167 +112
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
@Wraith2: based on the other conversation we had on PR #2065, what do you think on this change request?