We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Issue Type: Bug
Code formatting does not behave properly when declaring a hashtable in a IF condition.
Set your codeFormatting options to:
"powershell.codeFormatting.ignoreOneLineBlock": true, "powershell.codeFormatting.openBraceOnSameLine": true, "powershell.codeFormatting.newLineAfterCloseBrace": true, "powershell.codeFormatting.newLineAfterOpenBrace": true,
Write the following statement
if ($test -eq $null) {$test = @{}} if ($test -eq $null) { $test = @{ } }
Once formatted, they will appear as :
if ($test -eq $null) { $test = @{ } } if ($test -eq $null) { $test = @{ } }
Trying the same thing with test assignment being an array @() instead of a hashtable work properly .
if ($test -eq $null) { $test = @() } if ($test -eq $null) { $test = @() }
Extension version: 2019.5.0 VS Code version: Code 1.36.0 (0f3794b38477eea13fb47fbe15a42798e6129338, 2019-07-03T13:25:46.372Z) OS version: Windows_NT x64 10.0.17763
The text was updated successfully, but these errors were encountered:
Code formatting functionality is provided by PSScriptAnalyzer. Can you submit this bug on that project - https://github.com/powershell/scriptanalyzer/issues? Thanks.
Sorry, something went wrong.
cc @bergmeister for visibility
PowerShell/PSScriptAnalyzer#1284
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
Issue Type: Bug
Code formatting does not behave properly when declaring a hashtable in a IF condition.
Set your codeFormatting options to:
Write the following statement
Once formatted, they will appear as :
Trying the same thing with test assignment being an array @() instead of a hashtable work properly .
Extension version: 2019.5.0
VS Code version: Code 1.36.0 (0f3794b38477eea13fb47fbe15a42798e6129338, 2019-07-03T13:25:46.372Z)
OS version: Windows_NT x64 10.0.17763
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: