vscode-powershell
vscode-powershell copied to clipboard
do-while extra parenthesis on snippet
Issue Type: Bug
If you type do-while and accept the auto-complete snippet it will add an extra trailing parenthesis.
do {
} while ( <# Condition that stops the loop if it returns false #>) )
Extension version: 2022.5.1 VS Code version: Code 1.67.2 (c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5, 2022-05-17T18:15:52.058Z) OS version: Windows_NT x64 10.0.19044 Restricted Mode: No
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz (8 x 1992) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_renderer: enabled_on video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled |
| Load (avg) | undefined |
| Memory (System) | 15.78GB (6.11GB free) |
| Process Argv | --crash-reporter-id 05b54849-6b60-4ab2-a4e4-8ff75972923f |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30443607
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
pythonvsnew555:30457759
vscscmwlcmt:30465135
cppdebug:30492333
vsclangdf:30486550
Thanks! Might be an intellisense miss.
I the same issue, but not just for do-while. Using snippet for an If statement gives me:
if (condition) { <# Action to perform if the condition is true #> }
foreach:
foreach ($currentItemName in $collection) { <# $currentItemName is the current item #> }
I the same issue, but not just for do-while. Using snippet for an If statement gives me:
if (condition) { <# Action to perform if the condition is true #> }foreach:
foreach ($currentItemName in $collection) { <# $currentItemName is the current item #> }
Maybe I'm missing something, but I don't see any problem with those examples, just the do-while. And while we are at it, don't you think the "foreach-item" is redundant? as it's already covered by the normal "foreach" snippet
And while we are at it, don't you think the "foreach-item" is redundant? as it's already covered by the normal "foreach" snippet
Probably, it was maintained for backwards compatibility for anyone expecting it but we can probably clean that up.
This issue has been marked as fixed. It has been automatically closed for housekeeping purposes.