PowerShell / PowerShell/vscode-powershell
The snippet "Parameter: Suppress PSScriptAnalyzer Rule" is missing a closing quote and comma
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
When using the snippet to suppress a PSScriptAnalyzer rule on a parameter, there is no closing quote or comma after the parameter name field.
Additionally, when tabbing through the snippet, the parameter name field and the justification field are both selected at the same time, though this doesn't bother me nearly as much so no objections if there's a reason it needs to stay that way.
PowerShell Version
> $PSVersionTable;$Host
Name Value
---- -----
PSVersion 5.1.19041.3930
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.3930
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Name : Visual Studio Code Host
Version : 2024.0.0
InstanceId : 81fc513a-022e-4fba-82ec-06feefb556d3
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
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.86.0
05047486b6df5eb8d44b2ecd70ea3bdf775fd937
x64
Extension Version
> code --list-extensions --show-versions | Select-String powershell
ms-vscode.powershell@2024.0.0
Steps to Reproduce
- Open a new or existing powershell file
- Open the command palette (e.g., ctrl+shift+P)
- Type "Snippets: Insert Snippet" and press enter
- Search for "suppress-message-rule-parameter" and press enter
- Snippet is inserted with missing quote and comma
Visuals
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
Individua lo snippet suppress-message-rule-parameter nelle definizioni degli snippet dell’estensione e riproducilo tramite Snippets: Insert Snippet in un file PowerShell. Il lavoro è completato quando lo snippet inserito contiene la virgoletta di chiusura e la virgola mancanti dopo il nome del parametro e il comportamento del tab-stop segnalato è stato verificato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- powershell
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100