This is a very silly and insignificant problem, but I’d still rather post it
- Operating system: Windows 11
- Visual Studio version: 17.14.17
- SonarQube for Visual Studio plugin version: 8.29.0.14599
- Programming language you’re coding in: C#
And a thorough description of the problem / question:
In the following code :
class Foo
{
private string _test;
public string Test
{
get
{
string a = string.Empty;
return a;
}
set
{
_test = "b";
}
}
}
The S4275 warning highlights correctly the set keyword, but for the getter, Empty is highlighted instead of get :
The problem seems to leave when I remove string.Empty
