You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
codeFormatting.whitespaceBetweenParameter setting causing characters to be dropped from scripts #1529
If "powershell.codeFormatting.whitespaceBetweenParameter" is set to "true", running the auto formatter will result in loss of some characters from scripts.
E.g.
Write-Host "##vso[task.setvariable variable=$VariableName;]$VariableValue"
Becomes
Write-Host "##vso[task.setvariable variable=$VariableName;$VariableValue"
Note the loss of the "]"
If the setting is commented out in settings.json or you set it to "false", the formatter behaves properly.
This also happens with the PowerShell Preview extension.
Extension version: 2020.6.0
VS Code version: Code 1.46.0 (a5d1cc28bb5da32ec67e86cc50f84c67cc690321, 2020-06-10T09:03:20.462Z)
OS version: Windows_NT x64 10.0.18362
System Info
Item
Value
CPUs
Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz (8 x 1992)
Rob Peck (@sbrp) Thank you for taking the time to provide details. This is a new setting that we recently added and its default is false. This issue has already been fixed as part of #1498 but is pending a patch release of PSScriptAnalyzer, which we plan to do in the next few weeks. In the meantime we suggest to set the setting value to its default value of false.
FYI Rob Holt (@rjmholt)James Truher (@JamesWTruher)Sydney Smith (@SydneyhSmith)
Activity
bergmeister commentedon Jun 17, 2020
Rob Peck (@sbrp) Thank you for taking the time to provide details. This is a new setting that we recently added and its default is
false. This issue has already been fixed as part of #1498 but is pending a patch release of PSScriptAnalyzer, which we plan to do in the next few weeks. In the meantime we suggest to set the setting value to its default value offalse.FYI Rob Holt (@rjmholt) James Truher (@JamesWTruher) Sydney Smith (@SydneyhSmith)