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
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)
@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 @rjmholt@JamesWTruher@SydneyhSmith
Issue Type: Bug
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
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: