Enable Culture Code Quality Rules#20957
Merged
Merged
Conversation
PunkPun
reviewed
Jul 7, 2023
db4fb4c to
ebaa68a
Compare
PunkPun
previously approved these changes
Jul 9, 2023
Member
PunkPun
left a comment
There was a problem hiding this comment.
LGTM,
My local culture is american english so I might have missed something
abcdefg30
reviewed
Jul 9, 2023
Member
|
I'd advise to not merge this before the prep branch is split off |
ebaa68a to
392b232
Compare
Member
|
I think these are pretty save. They only prevent common errors we made in the past with non US locales. |
392b232 to
c22f4f3
Compare
23dd22f to
e836f9a
Compare
Member
|
needs a rebase |
e836f9a to
84a778a
Compare
Member
|
Needs a rebase. |
84a778a to
a978cb4
Compare
Member
|
rebased |
Mailaender
approved these changes
Aug 7, 2023
Member
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.
Following on from #20814.
Enables a batch of rules related to culture/format/comparison correctness. Although these don't detect all patterns, they enforce the the culture, format or comparison of string related parsing, ToString or comparsions. This is particuarly helpful since if not specified culture and format defaults to the current culture - i.e. the culture of the user. This tends to break most code which would prefer to parse and format in the invariant culture and falls over if the user's culture doesn't line up as expected (i.e. if you dare to use anything other than en-US conventions).
I have specified oridinal/invariant comparsions for most parsing and formatting related code, and for user facing inputs or display have used their culture. The culture specified in some areas has changed compared to before. Please review and see if you agree with the chosen settings.