[Formatter] Do not force indentation style unless certain line length were met
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 50/100
調査の方向性
issue の PowerShell 例を使って formatter の動作を再現し、次に formatter の実装と既存のテストを見つけます。行長の条件がインデントの適用にどのような影響を与えるべきかを判断します。完了の条件は、formatter の既存の動作を壊すことなく、短い文が「expected」の下に示されたコンパクトな形式を維持することです。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- C#
- スター
- 2.2k
- フォーク
- 415
- 平均マージ
- 13時間 1分
- マージ済み PR(30日)
- 2
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PowerShell/PSScriptAnalyzer のほかの issue
-
Up-for-Grabs
難易度 1/5 1〜3時間 初心者へのやさしさ 78/100
PowerShell/PSScriptAnalyzer#2213 · コメント 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
PowerShell/PSScriptAnalyzer#2217 · コメント 1 件 ·
-
PSUseConsistentIndentation double-indents attribute bodies that open a scriptblock (`[Attr({ … })]`) オープン
難易度 3/5 1〜2日 初心者へのやさしさ 70/100
PowerShell/PSScriptAnalyzer#2216 · コメント 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
PowerShell/PSScriptAnalyzer#2211 ·
-
`PSPlaceOpenBrace` and `PSPlaceCloseBrace` leave trailing whitespace when expanding one-line blocks オープン
難易度 3/5 1〜2日 初心者へのやさしさ 70/100
PowerShell/PSScriptAnalyzer#2210 ·
PowerShell/PSScriptAnalyzer の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
nightscout/nocturne#1379 ·
-
priority-0
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
StackExchange/StackExchange.Redis#3249 ·
-
[Feat] 조합 영역 구분선 개선 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100