PowerShell / PowerShell/PSScriptAnalyzer
New Rule Suggestion: PSAvoidShorteningParameterNames
まだ誰も着手していません。
- 主要言語
- C#
- スター
- 2.2k
- フォーク
- 414
- 平均マージ
- 13時間 1分
- マージ済み PR(30日)
- 2
説明
As long as we're trying to get people to stop using aliases and positional parameters and shortened command names, we should fix the parameters too.
Summary of the new feature
A new rule that complains when you write Get-Content -Pa file.txt -ov contents and offers suggestions with the full proper parameter name of each parameter: Get-Content -Path file.txt -OutVariable contents
It should complain about shortened parameters and parameter aliases, when you're passing them directly -- but shouldn't worry about splatting or pipeline properties, etc.
Bonus points if you make it a ConfigurableRule with a setting to ignore parameter names that match aliases (as opposed to just being shortened forms of parameters or parameter aliases).
Double bonus points if you make AvoidPositionalParameters also a ConfigurableRule so people can choose to fail even if only one positional parameter is passed.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
ファイルやテストは指定されていません。まず PSScriptAnalyzer 内にある既存の AvoidPositionalParameters ルールと ConfigurableRule パターンを見つけ、次にルールがコマンド パラメーターをどのように検査しているかを追跡します。新しいルールが短縮名とエイリアスを処理し、スプラッティングとパイプライン プロパティを除外できれば完了です。オプションの構成と AvoidPositionalParameters の変更は、実装される場合、それぞれ個別にサポートされます。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp, powershell
- 領域
- cli, tooling
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 25/100