Skip to content

do-while extra parenthesis on snippet #4002

New issue

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

Closed
gaston-senac opened this issue May 27, 2022 · 5 comments
Closed

do-while extra parenthesis on snippet #4002

gaston-senac opened this issue May 27, 2022 · 5 comments
Assignees
Labels
Area-Snippets Issue-Bug A bug to squash. Resolution-Fixed Will close automatically.

Comments

@gaston-senac
Copy link

gaston-senac commented May 27, 2022

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

@ghost ghost added the Needs: Triage Maintainer attention needed! label May 27, 2022
@JustinGrote JustinGrote self-assigned this May 27, 2022
@JustinGrote
Copy link
Collaborator

Thanks! Might be an intellisense miss.

@JustinGrote JustinGrote added Issue-Bug A bug to squash. Area-Snippets and removed Needs: Triage Maintainer attention needed! labels May 27, 2022
@th3d00rw4y
Copy link

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 #> }

@gaston-senac
Copy link
Author

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

@JustinGrote
Copy link
Collaborator

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.

@andyleejordan andyleejordan added the Up for Grabs Will shepherd PRs. label Jun 2, 2022
@andyleejordan andyleejordan added Resolution-Fixed Will close automatically. and removed Up for Grabs Will shepherd PRs. labels Dec 7, 2022
@ghost ghost closed this as completed Dec 7, 2022
@ghost
Copy link

ghost commented Dec 7, 2022

This issue has been marked as fixed. It has been automatically closed for housekeeping purposes.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Snippets Issue-Bug A bug to squash. Resolution-Fixed Will close automatically.
Projects
None yet
Development

No branches or pull requests

4 participants