PowerShell / PowerShell/vscode-powershell

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

Offen
#3,926 7 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Area-Code Formatting Issue-Bug
Vorherrschende Sprache
TypeScript
Sterne
1.9k
Forks
548
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Reproduzieren Sie das Problem in der PowerShell-Erweiterung mit einem kommentar-basierten Hilfe-Block in derselben Zeile wie eine Funktion, und wenden Sie anschließend Format Document sowie format-on-save an. Verfolgen Sie das für die falsche Einrückung verantwortliche Formatierungsverhalten nach und überprüfen Sie, dass der Block korrekt positioniert bleibt, ohne die im Issue beschriebenen Fälle zu beeinträchtigen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
powershell, typescript, vscode
Bereich
tooling
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.