PowerShell / PowerShell/PSScriptAnalyzer
UseCompatibleCommands should recognise partial parameter matches
まだ誰も着手していません。
- 主要言語
- C#
- スター
- 2.2k
- フォーク
- 414
- 平均マージ
- 13時間 1分
- マージ済み PR(30日)
- 2
説明
Summary of the new feature
PowerShell allows for the usage of partial parameter names, like Import-Module 'MyModule' -Pass.
UseCompatibleCommands currently sees this is a compatibility error.
While PSScriptAnalyzer should discourage truncated parameter names (like command aliases), UseCompatibleCommands should be able to recognise the difference between a truncated parameter that will work and something that will not.
Proposed technical implementation details (optional)
The query API currently uses a dictionary to look up parameters. Instead of this, it should lazily compute a trie of parameters that is able to tell whether a parameter is uniquely resolved given an input.
What is the latest version of PSScriptAnalyzer at the point of writing
1.18.0
/cc @JamesWTruher
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず UseCompatibleCommands とそのクエリ API をたどり、現在の辞書ベースのパラメーター検索を見つけます。PowerShell の部分的なパラメーター名がどのように分類されるかを確認し、一意に解決される短縮形と、曖昧または無効な短縮形についての動作を検証します。アナライザーの既存の互換性チェックを弱めることなく、有効な部分一致が受け入れられれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp, powershell
- 領域
- tooling
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100