Skip to content

False positive on 'PSUseApprovedVerbs' when scope is declared as a prefix to the Verb-Noun combination #473

Closed
@Meglomax

Description

@Meglomax

Reference message: "The cmdlet 'Local:Test-Something' uses an unapproved verb."

Where Advanced Functions are declared with a scope prefix the rule generates a false positive.

For example:
Function Local:Test-Something {...}
Function Script:Test-SomethingElse {...}
etc.. same for Global and Private.

Not trying to justify the syntax or the appropriate use cases for it. The syntax is however supported by PowerShell, and when used to declare the function the rule clearly generates a false positive (noting that without the scope prefix these Verb-Noun combinations pass the rule).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions