Skip to content
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

Enable latest-Recommended analysis rules #142

Merged
merged 2 commits into from
Jul 23, 2024

Conversation

lahma
Copy link
Collaborator

@lahma lahma commented Jul 18, 2024

  • move Directory.Build.props to root
  • fix some issues

* move Directory.Build.props to root
* fix some issues
<NoWarn>$(NoWarn);CA1715;</NoWarn>

<!-- Do not declare visible instance fields -->
<NoWarn>$(NoWarn);CA1051;</NoWarn>
Copy link
Owner

Choose a reason for hiding this comment

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

If this is for the CompilationHelper then maybe I should just use properties or readonly fields.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's also all structs which don't use properties but public fields.

@@ -40,7 +42,7 @@ public TextLiteral(string text, StringComparison comparisonType)
}
else
{
ExpectedChars = ignoreCase ? [Text.ToUpper()[0], Text.ToLower()[0]] : [Text[0]];
ExpectedChars = ignoreCase ? [Text.ToUpper(CultureInfo.CurrentCulture)[0], Text.ToLower(CultureInfo.CurrentCulture)[0]] : [Text[0]];
Copy link
Owner

Choose a reason for hiding this comment

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

When you read the code this makes totally sense. At first I thought this was evil but this is exactly what the argument means. Good job.

@sebastienros sebastienros merged commit fab5f77 into sebastienros:main Jul 23, 2024
1 check passed
@lahma lahma deleted the analyzers branch July 23, 2024 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants