Skip to content

Rule: Filters to the left #4

Description

@clcaldwell

New rule to have checks for inefficient filtering.

Should warn on | Where-Object & .Where{} pattern when the cmdlet to the left of the pipe includes it's own filtering methods. Might have to either hard-code a list of cmdlets to flag this for, or do some sort of inspection and flag on cmdlets that have a -Filter, -Include, or -Exclude ?

Also see if we can flag the same thing for a filtering foreach, like: `foreach-object { if ($_.name -eq "abc") Do-Somethign }

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions