Skip to content

Revert or Redo PossibleIncorrectUsageOfRedirectionOperator #1975

Closed
@nf-developer

Description

@nf-developer

Summary of the new feature

As a developer I have valid Powershell code in my if-statement and I expect zero warnings but my IDE is displaying a warning:

if (!(command 2> $null)) {
   ...
}

The above code has 2> $null highlighted with the warning: PossibleIncorrectUsageOfRedirectionOperator.

Proposed technical implementation details (optional)

Revert or redo this offending PR: #881

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

How do I obtain this? The one that comes with VS Code > ms-vscode's PowerShell extension.

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