-
Notifications
You must be signed in to change notification settings - Fork 232
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
New rule S2198: Silly mathematical comparisons should not be made #6658
Comments
Maybe this could be a part of S2437. Or even better, the other way around, we could merge the rules and have different diagnostics. |
Looking a bit at what this rule covers, as well as some testing:
This is covered by CS0652 for all types of of comparisons (<, <=, >, >=, ==)
This is covered by CS0652 for all types of of comparisons (<, <=, >, >=, ==)
This is covered by CS0652 for comparing a
Not covered.
Not covered.
Not covered.
Maybe we can implement a comparison between |
We decided to implement only the parts that are NOT covered by CS0652, meaning:
Also, to cut branches we will only implement the C# part of the rule, at least at first. Also, it will indeed be part of S2437. |
S2198
RSPEC PR: SonarSource/rspec#1534
The text was updated successfully, but these errors were encountered: