Skip to content

Add rules for Named/Positional Parameter use on object creation #2006

Open
@kilasuit

Description

@kilasuit

*Summary of the new feature
This PR in PowerShell - Add support for named argument with .NET Methods will add additional functionality which would be useful to add some rules around it's use to aid in coding styles, not only to aid in coding style but to reduce errors in use

Examples & levels that I think would be useful include

  • Avoid mixing named & positional parameters on object creation (Information)
  • Use only named parameters for object creation (Information)
  • Use only positional parameters for object creation (Warning) (for backcompat checks

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

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