PowerShell / PowerShell/PSScriptAnalyzer
Rule Request: Warn Against Special Characters that PowerShell Accepts
オープン
まだ誰も着手していません。
Area - Rules
Issue - Enhancement
Issue - New Rule
Up-for-Grabs
- 主要言語
- C#
- スター
- 2.2k
- フォーク
- 414
- 平均マージ
- 13時間 1分
- マージ済み PR(30日)
- 2
説明
Powershell 7 supports the use of Em Dash ( – ) for parameter prefixes, while Windows Powershell doesn't and can cause errors such as
Invoke-Command –ComputerName $Computer ...
–ComputerName $Computer
The string is missing the terminator: "
I'm not sure how but in the last month a good dozen Em Dashes were accidentally added to my codebase.
As Em Dashes are almost impossible to notice in a fix width font, I think it should be considered best practice to never use them and put a big error/warning on screen when you come across one.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
実装ファイル、テスト、エントリポイントのいずれも指定されていません。まず PSScriptAnalyzer 内の既存のルール登録とルールテストを見つけ、次に PowerShell パラメーターの位置にある em dash をどのように報告すべきかを判断してください。アナライザーがその文字について一貫して警告し、テストが報告されたケースをカバーしていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp, powershell
- 領域
- tooling
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100