SonarSource / sonar-dotnet

Code analyzer for C# and VB.NET projects
https://redirect.sonarsource.com/plugins/csharp.html
GNU Lesser General Public License v3.0
796 stars 228 forks source link

Fix S3900 FN: Rule does not raise on LINQ methods #9500

Open Tim-Pohlmann opened 4 months ago

Tim-Pohlmann commented 4 months ago
void Method(List<int> list)
{
    _ = list.Where(x => true);  // FN
}

S3900 should re-use the list of known LINQ methods introduced in #9414 to raise in cases like this.