Skip to content

PSAvoidAssignmentToAutomaticVariable Errors on validateset #1970

Closed
@nascentt

Description

@nascentt

I have been getting errors on validateset because PSScriptAnalyzer is confusing the validateset as assignment.

An example of this happening is

[validateset($True, $False)]
[bool]$UnfurlLinks,

[validateset($True, $False)]
[bool]$UnfurlMedia,

from https://github.com/RamblingCookieMonster/PSSlack/blob/master/PSSlack/Public/New-SlackMessage.ps1

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