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

New Rule S4545: "DebuggerDisplayAttribute" strings should reference existing members #6703

Closed
zsolt-kolbay-sonarsource opened this issue Feb 2, 2023 · 0 comments · Fixed by #6728
Assignees
Labels
Area: C# C# rules related issues. Area: VB.NET VB.NET rules related issues. Type: New Feature This hasn't been here before.
Projects
Milestone

Comments

@zsolt-kolbay-sonarsource
Copy link
Contributor

zsolt-kolbay-sonarsource commented Feb 2, 2023

Implement S4545 for C# and VB.NET

RSPEC PR: SonarSource/rspec#1571

Remark: implementation merged before corresponding RSPEC is ready. Changes to the sonar-dotnet repo are to be expected, when running rspec update upon release.

Peach Validation

During validation on peach, the following positive cases about case sensitivity were found:

The check for existing members done by this implementation is done respecting case sensitivity rules for the language in which the source was written, although they should be done according to case sensitivity rules for the language in which the debugger is being executed.
Therefore, a DebuggerDisplayAttribute containing a format string with a reference to a property in wrong case would generate an exception in debugger when debugging a C# project, whereas it would not on a VB.NET project.

@zsolt-kolbay-sonarsource zsolt-kolbay-sonarsource added Type: New Feature This hasn't been here before. Area: VB.NET VB.NET rules related issues. Area: C# C# rules related issues. labels Feb 2, 2023
@antonioaversa antonioaversa added this to the 8.53 milestone Feb 6, 2023
@github-actions github-actions bot added this to To do in Best Kanban Feb 6, 2023
@antonioaversa antonioaversa moved this from To do to In progress in Best Kanban Feb 6, 2023
@github-actions github-actions bot moved this from In progress to Review in progress in Best Kanban Feb 8, 2023
@github-actions github-actions bot moved this from Review in progress to In progress in Best Kanban Feb 8, 2023
@github-actions github-actions bot moved this from In progress to Review approved in Best Kanban Feb 9, 2023
@github-actions github-actions bot moved this from Review approved to Review in progress in Best Kanban Feb 9, 2023
@antonioaversa antonioaversa moved this from Review in progress to In progress in Best Kanban Feb 13, 2023
@github-actions github-actions bot moved this from In progress to Review in progress in Best Kanban Feb 14, 2023
@github-actions github-actions bot moved this from Review in progress to In progress in Best Kanban Feb 15, 2023
@antonioaversa antonioaversa modified the milestones: 8.53, 8.54 Feb 16, 2023
@github-actions github-actions bot moved this from In progress to Review in progress in Best Kanban Feb 21, 2023
@github-actions github-actions bot moved this from Review in progress to Review approved in Best Kanban Feb 23, 2023
@github-actions github-actions bot moved this from Review approved to Review in progress in Best Kanban Feb 23, 2023
Best Kanban automation moved this from Review in progress to Validate Peach Feb 23, 2023
@antonioaversa antonioaversa moved this from Validate Peach to Done in Best Kanban Feb 28, 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. Type: New Feature This hasn't been here before.
Projects
Best Kanban
  
Done
4 participants