Skip to content

Add -Suppress parameter #1914

Closed
Closed
@iRon7

Description

@iRon7

PSScriptAnalyzer might potentially -Fix my scripts, but that is not possible for every rule (especially where it concerns false positives, such as #1472) and sometimes the "fix" is unwanted. In such a case I would like to be able to easily suppress the (remaining) violations with a command like:

Invoke-ScriptAnalyzer .\MyScript.ps1 -Suppress

(or something like: -SuppressViolations as there exist already some other -Suppress* parameters)

Where I would expect an as-narrow-as-possible suppression (using the ConditionalAttribute) for the SuppressMessageAttribute on the concerned (inner) function.

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