Skip to content

Suggestion: Parameter modification warning #2059

Open
@sirtao

Description

Summary of the new feature

User has a function with a a parameter called, for this example, $PassedParam.
Inside the function, the $PassedParam is assigned with a new value.
This cause the type constrainment and the various Validate attributes checks to trigger again.

I propose a warning to suggest the user to treat parameters as read-only

What is the latest version of PSScriptAnalyzer at the point of writing

1.23.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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