PowerShell / PowerShell/vscode-powershell

Comment-Based Help after function name indents improperly on "Format Document"

Aperta
#3,926 7 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Area-Code Formatting Issue-Bug
Lingua principale
TypeScript
Stelle
1.9k
Fork
547
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Prerequisites
  • I have written a descriptive issue title.
  • I have searched all 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

Comment block indents during formatting when it shouldn't. Doesn't occur if block is above the function or if the whole block is already indented.

PowerShell Version
Latest
Visual Studio Code Version
1.67.0-insider
e6d98a13fcd3bf928d0e755eaae873ac200a98bd
x64
Extension Version
ms-vscode.powershell-preview@2022.4.1
Steps to Reproduce
  1. Create Function
  2. Comment based help on same line as function
  3. Format document or format-on-save
Visuals

https://user-images.githubusercontent.com/15258962/163913559-fd6f3949-1f40-433f-820b-6e81e995711c.mp4

Logs

No response

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riprodurre il problema nell’estensione PowerShell usando un blocco di guida basato sui commenti sulla stessa riga di una funzione, quindi applicare Format Document e format-on-save. Tracciare il comportamento di formattazione responsabile dell’indentazione errata e verificare che il blocco rimanga posizionato correttamente senza introdurre regressioni nei casi descritti nell’issue.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
powershell, typescript, vscode
Ambito
tooling
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.