PowerShell / PowerShell/PowerShellEditorServices

Formatter stopped working when `md` is used

Aperta
#2,261 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Issue-Bug Needs: Triage
Lingua principale
C#
Stelle
767
Fork
266
Merge medio
3g 16h
PR unite (30g)
1

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 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

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

Riproduci il comportamento del formatter con autoCorrectAliases abilitato, confrontando l’esempio md con gli esempi funzionanti ni e New-Item. Traccia come il formatter gestisce l’alias md e verifica che la formattazione dell’esempio produca l’indentazione e l’output previsti invece di non fare nulla.

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

Valutazione

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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.