Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
bergmeister opened this issue May 13, 2020 · 0 comments · Fixed by #1498

Comments

@bergmeister
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant