Skip to content

codeFormatting.whitespaceBetweenParameter setting causing characters to be dropped from scripts #1529

Closed
@sbrp

Description

@sbrp

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
Item Value
CPUs Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz (8 x 1992)
GPU Status 2d_canvas: enabled
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
Load (avg) undefined
Memory (System) 7.89GB (1.27GB free)
Process Argv
Screen Reader no
VM 0%

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions