Obvious S1172 false positives in C#

Visual Studio 2019 with Sonar Lint 6.1.0.45943 displays lots and lots of S1172 false alarms, since a few days. Here is an example that SonarLint flags with unused parameters:

private static string MakePropertyKey(string prefix, string propertyName)
{
	return (String.IsNullOrEmpty(prefix)) ? propertyName : prefix + "." + propertyName;
}

Hey there.

You’re facing a known issue in the underlying C# analyzer that you can track here: S1172 flags used parameters on private method as unused · Issue #5491 · SonarSource/sonar-dotnet · GitHub

Thanks, will watch that issue!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.