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
781 stars 226 forks source link

Fix S3247 FP: Should not report on member access objects #9485

Closed pavel-mikula-sonarsource closed 3 months ago

pavel-mikula-sonarsource commented 3 months ago

Rule should not report on member-access symbols

        if (arg.Property is Fruit)                  // Noncompliant FP
        {
            _ = (Fruit)differentInstance.Property;  // Secondary
        }