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

Fix S1125 FN: recognize C#9 "is not" constant pattern #7688

Closed
cristian-ambrosini-sonarsource opened this issue Jul 26, 2023 · 0 comments · Fixed by #7687
Closed

Fix S1125 FN: recognize C#9 "is not" constant pattern #7688

cristian-ambrosini-sonarsource opened this issue Jul 26, 2023 · 0 comments · Fixed by #7687
Assignees
Labels
Area: C# C# rules related issues.
Milestone

Comments

@cristian-ambrosini-sonarsource
Copy link
Contributor

Following #2619, S1125 should cover C#9 feature NotPattern "is not".

var x = false;
if (x is true)
{
   // S1125 warning
}

if (x is not true)
{
   // no S1125 warning
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: C# C# rules related issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants