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

Migrate S2583/S2589 to the new Symbolic Execution engine (C#) #7646

Closed
9 tasks done
mary-georgiou-sonarsource opened this issue Jul 24, 2023 · 0 comments · Fixed by #7718
Closed
9 tasks done

Migrate S2583/S2589 to the new Symbolic Execution engine (C#) #7646

mary-georgiou-sonarsource opened this issue Jul 24, 2023 · 0 comments · Fixed by #7718
Assignees
Labels
Area: C# C# rules related issues. Area: CFG/SE CFG and SE related issues.
Milestone

Comments

@mary-georgiou-sonarsource
Copy link
Contributor

mary-georgiou-sonarsource commented Jul 24, 2023

Migrate ConditionEvaluatesToConstant to the new SE engine.

Split the work up to the following PRs:

  • Scaffold the rule
    • Prepare empty rule with ShouldExecute false (do the scaffolding for both C# and VB.NET)
    • Prepare tests and test cases - mark old Noncompliant as FIXME Non-compliant (for C# only)
    • Do not register in SymbolicExecutionRunner (yet)
  • Implementation (C# only)
    • Implement basic version of S2589 (checking if condition evaluations to constant)
    • Implement issue messages
    • Implement S2583 (checking not-reachable code-block)
    • Fix: Don't raise in constants
    • Fix: ConditionEvaluated is not being called when directly followed by a throw - this is raising FPs because conditions are evaluated as only true or only false.
    • Investigate FP issues with switch statements.
  • Finish the C# rule
    • Implement ShouldExecute (C# only)
@mary-georgiou-sonarsource mary-georgiou-sonarsource added Sprint: SE Area: C# C# rules related issues. Area: CFG/SE CFG and SE related issues. labels Jul 24, 2023
@mary-georgiou-sonarsource mary-georgiou-sonarsource added this to the 9.7 milestone Jul 24, 2023
@mary-georgiou-sonarsource mary-georgiou-sonarsource removed their assignment Jul 24, 2023
@Tim-Pohlmann Tim-Pohlmann self-assigned this Jul 25, 2023
@martin-strecker-sonarsource martin-strecker-sonarsource modified the milestones: 9.7, 9.8 Aug 4, 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: CFG/SE CFG and SE related issues.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants