Skip to content

unary operators not getting spaced #1239

Open
@msftrncs

Description

@msftrncs

Following up from #847 / #948,

PSSA 1.18.0 Invoke-Formatter no longer inserts a space between letter/word based unary operators, such as -split or -not.

If I use the format selection command in VS Code I get a different result, but I am suspecting that VSCode / PowerShell Extension is still using PSSA 1.17.x.

I suspect this is from trying not to space out the unary 'negate' or 'positive' operators. Probably a simple idea might be to look at the length of the operator, length > 2 should be spaced.

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