PowerShell / PowerShell/PowerShellEditorServices

Formatter stopped working when `md` is used

オープン
#2,261 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Issue-Bug Needs: Triage
主要言語
C#
スター
767
フォーク
266
平均マージ
3日 16時間
マージ済み PR(30日)
1

説明

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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

autoCorrectAliases を有効にした状態で formatter の動作を再現し、md の例を動作する ni と New-Item の例と比較します。formatter が md エイリアスをどのように処理するかを追跡し、サンプルをフォーマットすると何もしないのではなく、期待されるインデントと出力が生成されることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
powershell
領域
tooling
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。