Using SonarLint for Visual Studio 2017 version 4.1.0.3539, with Visual Studio Professional 2017 Version 15.7.3
Created a .NET Core 2.0 Console App with the following code (just 1 file). It flags “internal static class Factory” with “S1144 Remove the unused internal type ‘Factory’.”
using System;
namespace TestApp
{
internal static class Program
{
static void Main(string[] args)
{
var retriever = Retriever.Factory.CreateRetriever();
Console.WriteLine(retriever.Retrieve());
}
}
internal class Retriever
{
internal static class Factory
{
public static Retriever CreateRetriever()
{
return new Retriever();
}
}
internal string Retrieve()
{
return "Results";
}
}
}