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

SE: Fix FN S2583/S2589 Equals #7704

Closed
2 tasks done
mary-georgiou-sonarsource opened this issue Jul 28, 2023 · 0 comments · Fixed by #7906
Closed
2 tasks done

SE: Fix FN S2583/S2589 Equals #7704

mary-georgiou-sonarsource opened this issue Jul 28, 2023 · 0 comments · Fixed by #7906
Assignees
Labels
Area: C# C# rules related issues. Area: VB.NET VB.NET rules related issues. Sprint: SE Short-lived* label for epic MMF-3077 *troll Type: False Negative Rule is NOT triggered when it should be.
Projects
Milestone

Comments

@mary-georgiou-sonarsource
Copy link
Contributor

When invoking Equals currently the engine is learning only object constraints.
It should also learn bool and number constraints.

Examples:

int i = 10;
if (object.Equals(i, i)) { }  // FN
  
bool a, b;
a = b = true;
if (object.Equals(a, b)) { }   // FN
  • Learn bool constraint from equals when parameters are bool.
  • Learn bool constraint from equals result when parameters are numerical values.
@mary-georgiou-sonarsource mary-georgiou-sonarsource added Sprint: SE Short-lived* label for epic MMF-3077 *troll Type: False Negative Rule is NOT triggered when it should be. Area: C# C# rules related issues. Area: VB.NET VB.NET rules related issues. labels Jul 28, 2023
@mary-georgiou-sonarsource mary-georgiou-sonarsource moved this from To do to In progress in Best Kanban Aug 15, 2023
@mary-georgiou-sonarsource mary-georgiou-sonarsource added this to the 9.8 milestone Aug 15, 2023
@mary-georgiou-sonarsource mary-georgiou-sonarsource removed their assignment Aug 17, 2023
@mary-georgiou-sonarsource mary-georgiou-sonarsource moved this from In progress to To do in Best Kanban Aug 17, 2023
@mary-georgiou-sonarsource mary-georgiou-sonarsource modified the milestones: 9.8, 9.9 Aug 18, 2023
@mary-georgiou-sonarsource mary-georgiou-sonarsource moved this from To do to In progress in Best Kanban Aug 22, 2023
@mary-georgiou-sonarsource mary-georgiou-sonarsource changed the title SE: Fix FN S2583/S2589 Equals and ReferenceEquals SE: Fix FN S2583/S2589 Equals Aug 25, 2023
@github-actions github-actions bot moved this from In progress to Review in progress in Best Kanban Aug 25, 2023
@mary-georgiou-sonarsource mary-georgiou-sonarsource moved this from Review in progress to In progress in Best Kanban Aug 25, 2023
@github-actions github-actions bot moved this from In progress to Review in progress in Best Kanban Aug 28, 2023
@github-actions github-actions bot moved this from Review in progress to In progress in Best Kanban Aug 28, 2023
@github-actions github-actions bot moved this from In progress to Review in progress in Best Kanban Aug 29, 2023
@github-actions github-actions bot moved this from Review in progress to Review approved in Best Kanban Aug 30, 2023
Best Kanban automation moved this from Review approved to Validate Peach Aug 31, 2023
@mary-georgiou-sonarsource mary-georgiou-sonarsource moved this from Validate Peach to Done in Best Kanban Sep 1, 2023
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. Area: VB.NET VB.NET rules related issues. Sprint: SE Short-lived* label for epic MMF-3077 *troll Type: False Negative Rule is NOT triggered when it should be.
Projects
Best Kanban
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants