PowerShell / PowerShell/PowerShellEditorServices

Formatter stopped working when `md` is used

Offen
#2,261 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Issue-Bug Needs: Triage
Vorherrschende Sprache
C#
Sterne
767
Forks
266
Ø Merge
3 T. 16 Std.
Gemergte PRs (30 T.)
1

Beschreibung

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 PowerShell Editor Services itself and does not reproduce in a standalone PowerShell instance, and is not an issue with my editor.
  • I have verified that I am using the latest version of PowerShell Editor Services.
  • If this is a security issue, I have read the security issue reporting guidance.
Summary

formatter stopped working when code contains md(the alias of mkdir function)

PowerShell Version
> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.5.4
PSEdition                      Core
GitCommitId                    7.5.4
OS                             NixOS 25.11 (Xantusia)
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Editor Version
$ nvim --version

NVIM v0.11.5
Build type: Release
LuaJIT 2.1.1741730670
Run "nvim -V1 -v" for more info
PowerShell Editor Services Version
4.4.0
Steps to Reproduce
  1. enable autoCorrectAliases lsp setting
  2. format following code
    md foo
    
    if ($foo) {
    echo foo
    }
    
  3. nothing happened
  4. format code without md
    ni foo
    
    if ($foo) {
    echo foo
    }
    
    succeeded
    New-Item foo
    
    if ($foo) {
        Write-Output foo
    }
    
Visuals

No response

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

Reproduziere das Formatter-Verhalten mit aktiviertem autoCorrectAliases und vergleiche dabei das md-Beispiel mit den funktionierenden ni- und New-Item-Beispielen. Verfolge, wie der Formatter den md-Alias verarbeitet, und überprüfe, dass das Formatieren des Beispiels die erwartete Einrückung und Ausgabe erzeugt, anstatt nichts zu tun.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

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

Neue Issues direkt in Ihr Postfach

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