PowerShell / PowerShell/PSScriptAnalyzer
Automatically split | characters to a new line
まだ誰も着手していません。
- 主要言語
- C#
- スター
- 2.2k
- フォーク
- 414
- 平均マージ
- 13時間 1分
- マージ済み PR(30日)
- 2
説明
Summary of the new feature/enhancement
I should state that I am using VS Code. I was told that for this feature to be possible in VS Code, it has to first be implemented here. The setting I mention down below is a VS Code Powershell setting.
I'd like to the ability to take the following line:
$Ports | ForEach-Object -Process { NETSTAT.EXE -ano | findstr.exe :8080 | ForEach-Object -Process { ($_ -split '\s+')[-1] } | Sort-Object | Get-Unique | ForEach-Object -Process { taskkill.exe /F /PID $_ } }
and convert it to:
$Ports |
ForEach-Object -Process {
NETSTAT.EXE -ano |
findstr.exe :8080 |
ForEach-Object -Process {
($_ -split '\s+')[-1]
} | Sort-Object |
Get-Unique |
ForEach-Object -Process {
taskkill.exe /F /PID $_
}
}
I think this would go a long way in approving readability. At the very least, with the
"powershell.codeFormatting.pipelineIndentationStyle": "IncreaseIndentationForFirstPipeline"
setting enabled, when I manually add the new line after each |, { , and }, it will format the indentation correctly which is nice.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
この issue には PowerShell の例が示され、VS Code の pipelineIndentationStyle 設定が参照されています。まず、PSScriptAnalyzer 内にある既存のパイプライン整形のエントリポイントと関連するテストを見つけてください。現在の動作を |、{、} の後で分割するという要求と比較し、示されているネストしたパイプラインとインデントの動作を対象とするテストで完了条件を定義してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- powershell
- 領域
- tooling
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100