New Rule S4545: "DebuggerDisplayAttribute" strings should reference existing members #6703
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
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.The text was updated successfully, but these errors were encountered: