PowerShell / PowerShell/PSScriptAnalyzer
`invoke-scriptanalyzer -fix -Confirm` should be more specific
オープン
まだ誰も着手していません。
Area - Engine
Issue-Enhancement
- 主要言語
- C#
- スター
- 2.2k
- フォーク
- 414
- 平均マージ
- 13時間 1分
- マージ済み PR(30日)
- 2
説明
Currently the -Fix -Confirm (and -WhatIf) common parameters aren't very specific on what and how PSScriptAnalyzer is about to correct the found violations:
invoke-scriptanalyzer .\Test.ps1 -fix -Confirm
Confirm
Are you sure you want to perform this action?
Performing the operation "Analyzing and fixing file C:\Users\Gebruiker\Scripts\Test\Rule\Test.ps1" on target "C:\Users\Gebruiker\Scripts\Test\Rule\Test.ps1".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): n
I would expect a more specific message of what and how a violation is changed, e.g.:
invoke-scriptanalyzer .\Test.ps1 -fix -Confirm
Confirm
Are you sure you want to perform this action?
Changing "$pascalCase = 'Test'" to "$PascalCase = 'Test'" at line 10 character 5 of file "Analyzing and fixing file C:\Users\Gebruiker\Scripts\Test\Rule\Test.ps1" on target "C:\Users\Gebruiker\Scripts\Test\Rule\Test.ps1".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): n
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず -Fix と -Confirm を指定して invoke-scriptanalyzer コマンドを再現し、次にその確認処理の実装箇所を特定します。ファイルもテストも指定されていません。完了の条件は、プロンプトで具体的な違反の変更とその場所が特定され、更新された確認動作がカバレッジで確認されていることです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp, powershell
- 領域
- cli, tooling
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100