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 S3966 to the new Symbolic Execution engine #7302

Closed
3 tasks done
pavel-mikula-sonarsource opened this issue May 30, 2023 · 1 comment · Fixed by #7338
Closed
3 tasks done

Migrate S3966 to the new Symbolic Execution engine #7302

pavel-mikula-sonarsource opened this issue May 30, 2023 · 1 comment · Fixed by #7338
Assignees
Labels
Area: C# C# rules related issues. Area: CFG/SE CFG and SE related issues. Sprint: SE Short-lived* label for epic MMF-3077 *troll Type: Improvement Making existing code better.
Projects
Milestone

Comments

@pavel-mikula-sonarsource
Copy link
Contributor

pavel-mikula-sonarsource commented May 30, 2023

Migrate ObjectsShouldNotBeDisposedMoreThanOnce

Split the work in 3 PRs:

  • Scaffold the rule
    • Prepare empty rule with ShouldExecute false
    • Prepare tests and test cases - mark old Noncompliant as FIXME Non-compliant
    • Do not register in SymbolicExecutionRunner (yet)
  • Implement
    • Implement rule logic, switch ShouldExecute to true
    • Register in SymbolicExecutionRunner
    • Update ITs
  • Finish the rule
    • Implement ShouldExecute
    • Remove all FIXME from test cases, mark them as FNs or Compliant

Additional steps to improve the rule:
Implement different messages according to the issue raised. One message for double disposal through the user calling Dispose or Close twice and one for the using statement, where the Dispose is called in Finally hidden behind using.

@pavel-mikula-sonarsource pavel-mikula-sonarsource added Type: Improvement Making existing code better. Area: CFG/SE CFG and SE related issues. Area: C# C# rules related issues. Sprint: SE Short-lived* label for epic MMF-3077 *troll labels May 30, 2023
@pavel-mikula-sonarsource pavel-mikula-sonarsource added this to the 9.3 milestone May 30, 2023
@github-actions github-actions bot added this to To do in Best Kanban May 30, 2023
@mary-georgiou-sonarsource mary-georgiou-sonarsource moved this from To do to In progress in Best Kanban Jun 5, 2023
@gregory-paidis-sonarsource gregory-paidis-sonarsource modified the milestones: 9.3, 9.4 Jun 6, 2023
@github-actions github-actions bot moved this from In progress to Review in progress in Best Kanban Jun 6, 2023
@pavel-mikula-sonarsource pavel-mikula-sonarsource moved this from Review in progress to In progress in Best Kanban Jun 7, 2023
@mary-georgiou-sonarsource mary-georgiou-sonarsource moved this from In progress to Review in progress in Best Kanban Jun 9, 2023
@github-actions github-actions bot moved this from Review in progress to In progress in Best Kanban Jun 12, 2023
@github-actions github-actions bot moved this from In progress to Review in progress in Best Kanban Jun 13, 2023
@github-actions github-actions bot moved this from Review in progress to Review approved in Best Kanban Jun 13, 2023
Best Kanban automation moved this from Review approved to Validate Peach Jun 13, 2023
@mary-georgiou-sonarsource
Copy link
Contributor

The last point is nice to have and will be implemented in follow-up PR (if time allows it - otherwise I'll remove it from here)

@mary-georgiou-sonarsource mary-georgiou-sonarsource moved this from Validate Peach to Done in Best Kanban Jun 15, 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. Sprint: SE Short-lived* label for epic MMF-3077 *troll Type: Improvement Making existing code better.
Projects
Best Kanban
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants