Skip to content

CheckParameter option of UseConsistentWhitespace (off by default): When turned, on removes part of script #1495

Closed
@bergmeister

Description

@bergmeister

Setting the vs code setting "powershell.codeFormatting.whitespaceBetweenParameters": true
Steps to reproduce

Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force

$Type = 'Test'

'Onet', 'Evotec' | Where-Object {
    if ($Type -eq 'Test') {
        #$_
    }
}

Expected behavior

Code is functionally the same

Actual behavior

The interpolated string on the first line gets removed.

Import-Module "$PSScriptRoot\-Force

$Type = 'Test'

'Onet', 'Evotec' | Where-Object {
    if ($Type -eq 'Test') {
        #$_
    }
}

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

Environment data

PSSA 1.19.0

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions