For some reason github issues are not possible to open. Please review your gh settings, because it’s very inconvenient to use this site with both UI and UX from 2007.
namespace Sonar;
internal static class Test
{
private static string Test1(string x) => string.Empty; // <-- S1172 is NOT reported here
private static string Test2(string x) => string.Empty; // <-- S1172 is reported here
public static void Main()
{
_ = Enumerable.Empty<string>().Select(Test1); // FN
_ = Enumerable.Empty<string>().Select(x => Test2(x)); // Everything works as expected
}
}
- What language is this for? C#
- Which rule? S1172
- Why do you believe it’s a false-positive/false-negative? FN
- SonarAnalyzer.CSharp,10.4.0.108396