Skip to content

Conversation

@jjonescz
Copy link
Member

Fixes #81417.

@jjonescz jjonescz requested a review from a team as a code owner November 25, 2025 11:58

return analyzerConfigOptions.TryGetValue(AnalysisLevelKey, out var value)
&& double.TryParse(value, out var version)
&& double.TryParse(value, NumberStyles.Float | NumberStyles.AllowThousands, CultureInfo.InvariantCulture, out var version)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like I have worked in codebases in the past where all of the 'format' and 'parse' methods involving strings would have an analyzer to mandate the use of an IFormatProvider; is this something where we should check to see if the rule is enabled?

Copy link
Member Author

@jjonescz jjonescz Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found CA1305 but when I've tried enabling it, it didn't catch double.TryParse anyway (perhaps because the overload with IFormatProvider has also the additional NumberStyles parameter).

@jjonescz jjonescz requested review from a team and phil-allen-msft November 26, 2025 09:21
@jjonescz jjonescz merged commit f35fe3f into dotnet:main Nov 26, 2025
27 checks passed
@jjonescz jjonescz deleted the 81417-EditorConfigLocale branch November 26, 2025 09:53
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Code style options severity not respected during build using non-en windows

3 participants