Skip to content

Deprecated Rules should be included and be available to call manually #578

Closed
@kilasuit

Description

@kilasuit

From what I can currently see the Deprecated Rules aren't being added to the released version of PSScriptAnalyzer.

As the number of rules grows and more rules get deprecated there may well be a requirement from those in the community to be able to make use of a deprecated rule in a non-standard & possibly quite an obscure manner.

I think that it would be useful for the deprecated rules to be shipped alongside the built in rules and then extend the Get-ScriptAnalyzerRule & Invoke-ScriptAnalyzer cmdlets like below

Invoke-ScriptAnalyzer -DeprecatedRule AvoidUninitializedVariable

The above would enforce the user to explicitly request to have the rule run. Whether this runs alongside all the built in rules or just runs this one rule would be a decision point that would need to be made

Get-ScriptAnalyzerRule -DeprecatedRules

I would expect that the above would just return the deprecated rules

Is this something that would be useful to others as well?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions