PowerShell / PowerShell/PSScriptAnalyzer
Accept `[ScriptBlock]` for `-ScriptDefinition`
オープン
まだ誰も着手していません。
Issue - Enhancement
- 主要言語
- C#
- スター
- 2.2k
- フォーク
- 414
- 平均マージ
- 13時間 1分
- マージ済み PR(30日)
- 2
説明
Summary of the new feature
[ScriptBlock]s might contain both single and double quotes therefore it would makes sense to accept a ScriptBlock for the -ScriptDefinition parameter so that it isn't necessarily to replace either the single quotes or double quotes in e.g. (Pester) test scenario's.
Proposed technical implementation details (optional)
Invoke-ScriptAnalyzer -ScriptDefinition { Write-Host 'Test:' "$Test" }
(Workaround)
Invoke-ScriptAnalyzer -ScriptDefinition { Write-Host 'Test:' "$Test" }.ToString()
What is the latest version of PSScriptAnalyzer at the point of writing
1.21.0
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、Invoke-ScriptAnalyzer の -ScriptDefinition オプションのパラメーター定義と処理を見つけます。既存の String の動作を、提案されている ScriptBlock の例と比較し、その後、既存の使用方法を引き続きサポートしながら、ToString() を要求せずに引用符で囲まれた内容が受け入れられることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- powershell
- 領域
- devtools
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100