Skip to content

Fix S1172 FP: Says value is ignored when used on the next line #9807

Description

@bkqc

Description

The rule says values is ignored in the method though its Contains method is used as delegate in the Any clause.

Reproducer

string[] MyMethod(string[] values)
    => _memberItems.Where(f => f.Filters.DispFilters.Any(values.Contains) && !f.RequiredElement())

Product and Version

SonarQube Server (can't find the installed version -- why not add an about page)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions