PowerShell / PowerShell/vscode-powershell
Intellisense for "[PSCustomObject]" leaves an extra close square bracket causing a syntax error
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 1.9k
- Fork
- 548
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Prerequisites
- I have written a descriptive issue title.
- I have searched all open and closed issues to ensure it has not already been reported.
- I have read the troubleshooting guide.
- I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
- I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
- If this is a security issue, I have read the security issue reporting guidance.
Summary
Using Intellisesnse while typing-out [PSCustomObject], before I type the closing square brackets, an extra square bracket is appended, causing a syntax error.
PowerShell Version
$psversiontable ;host
Name Value
---- -----
PSVersion 7.4.2
PSEdition Core
GitCommitId 7.4.2
OS Microsoft Windows 10.0.20348
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Name : Visual Studio Code Host
Version : 2024.2.2
InstanceId : 795c2dfd-55fe-4258-b089-29937135df2b
UI : System.Management.Automation.Internal.Host.InternalHos
tUserInterface
CurrentCulture : en-US
CurrentUICulture : en-US
PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled : True
IsRunspacePushed : False
Runspace : System.Management.Automation.Runspaces.LocalRunspace
Visual Studio Code Version
code --version
1.90.0
89de5a8d4d6205e5b11647eb6a74844ca23d2573
x64
Extension Version
code --list-extensions --show-versions | select-string powershell
ms-vscode.powershell@2024.2.2
Steps to Reproduce
Type "[PSCustom" and then press the tab key
Visuals
Pressing TAB at this point:
Causes this extra square bracket at this point:
Logs
No response
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Riproduci il problema in Visual Studio Code digitando "[PSCustom" e premendo Tab, quindi traccia la gestione del completamento IntelliSense dell'estensione. Il lavoro è completato quando il completamento del nome del tipo non inserisce una parentesi quadra di chiusura aggiuntiva e il PowerShell risultante rimane sintatticamente valido.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- powershell, typescript, vscode
- Ambito
- devtools
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 35/100