PowerShell / PowerShell/PSScriptAnalyzer
[Formatter] Do not force indentation style unless certain line length were met
オープン
まだ誰も着手していません。
Issue-Enhancement
Up for Grabs
- 主要言語
- C#
- スター
- 2.2k
- フォーク
- 414
- 平均マージ
- 13時間 1分
- マージ済み PR(30日)
- 2
説明
Prerequisites
- I have written a descriptive issue title.
- I have searched all issues to ensure it has not already been requested.
Summary
Formatter always format code as the specified indent style no matter how long the statement is:
# before
$foo = if ($true) {1} else {0}
# after
$foo = if ($true) {
1
} else {
0
}
# expected
$foo = if ($true) { 1 } else { 0 }
The code became too sparse by being enforced to the indentation style.
Proposed Design
No response
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
issue の PowerShell 例を使って formatter の動作を再現し、次に formatter の実装と既存のテストを見つけます。行長の条件がインデントの適用にどのような影響を与えるべきかを判断します。完了の条件は、formatter の既存の動作を壊すことなく、短い文が「expected」の下に示されたコンパクトな形式を維持することです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp, powershell
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 50/100