Skip to content

Formatter inserts redundant whitespace in ValidateSet attribute #1468

@bergmeister

Description

@bergmeister

Steps to reproduce

Format the following snippet with the default settings:

function Get-Noun
{
    param(
        [ValidateScript({ Test-Path $_ })]
        $Path
    )
}

Expected behavior

No changes to the line of ValidateScript

Actual behavior

It inserts a space after the ( of ValidateScript:

function Get-Noun
{
    param(
        [ValidateScript( { Test-Path $_ })]
        $Path
    )
}

If an unexpected error was thrown then please report the full error details using e.g. $error[0] | Select-Object *

Environment data

This happens in both PSSA 1.18.3 and 1.19.0

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions