Skip to content

Consider adding warning rule for Foreach-object break/continue/return #1544

Open
@PrzemyslawKlys

Description

@PrzemyslawKlys

Summary of the new feature

ForEach-Object is great. However, by its name, it's similar to foreach. Using continue/break/return within ForEach-Object to foreach is much different and does something that most people do not expect. It would be great for PSScriptAnalyzer to warn people about using it that way.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions