- Operating system: Windows 10
- Visual Studio version: 17.12.3
- SonarQube for Visual Studio plugin version: 8.11.0.11944
- Programming language you’re coding in: C#
- Is connected mode used: No
The quickfix for the rule S927 incorrectly changes the name of parameters if the corresponding method has overloads defined in the interface. (I applied the quickfix to the whole project at once)
Example:
public interface IFace
{
void Foo(string fooString);
void Foo(System.Text.RegularExpressions.Regex fooRegex);
}
and the implementation
public class MyImpl : IFace
{
public void Foo(string barString) // NONCOMPLIANT with S927
{
// [...]
}
public void Foo(System.Text.RegularExpressions.Regex barRegex) // NONCOMPLIANT with S927
{
// [...]
}
}
Then after applying the quickfix, it will look like this:
public class MyImpl : IFace
{
public void Foo(string fooString) // COMPLIANT
{
// [...]
}
public void Foo(System.Text.RegularExpressions.Regex fooString) // Still NONCOMPLIANT with S927
{
// [...]
}
}
The quickfix will change the name to fooString
for both overloads of the function instead of using fooRegex
for the second overload.