PowerShell / PowerShell/vscode-powershell
formatting should allow brace indent to match contained code indent
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 1.9k
- フォーク
- 548
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
System Details
- Operating system name and version: win7x64
- VS Code version: 1.8.2
- PowerShell extension version: 0.9.0
- Output from
$PSVersionTable:
Name Value
---- -----
PSVersion 5.1.14409.1005
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14409.1005
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Issue Description
howdy y'all,
currently the code formatter indents the braces & sub-controls [elseif/else] to the same level as the control block. i want them indented to the same level as the code.
default ...
if ($TestBool -eq $True)
{
Write-Output '$TestBool is TRUE.'
}
elseif ($TestBool -eq $False)
{
Write-Output '$TestBool is FALSE.'
}
else
{
Write-Output '$TestBool appears to be non-boolean.'
}
what i would prefer ...
if ($TestBool -eq $True)
{
Write-Output '$TestBool is TRUE.'
}
elseif ($TestBool -eq $False)
{
Write-Output '$TestBool is FALSE.'
}
else
{
Write-Output '$TestBool appears to be non-boolean.'
}
yes, it fails to match your documented style. [sigh ...] however,it is far easier for me to read than the style you chose.
i would dearly like to be able to set that indent style. it's whitesmith, i believe.
take care,
lee
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
この issue は VS Code 拡張機能の PowerShell formatter に関するものですが、ファイル、テスト、エントリーポイントは指定されていません。まず formatter と既存のフォーマット設定を見つけます。ユーザーが、波括弧と else/elseif を内包するコードのインデント位置に配置するインデントスタイル(要求されている Whitesmith スタイルを含む)を選択できるようになれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- powershell, typescript, vscode
- 領域
- tooling
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100