PowerShell / PowerShell/PSScriptAnalyzer
Add new rule to catch syntax error e.g. "elif" instead of "elseif"
まだ誰も着手していません。
- 主要言語
- C#
- スター
- 2.2k
- フォーク
- 414
- 平均マージ
- 13時間 1分
- マージ済み PR(30日)
- 2
説明
Summary of the new feature
Try formulating it in user story style (if applicable):
'As a python and powershell developer I want ScriptAnalyzer to detect when I use elif (python) instead of elseif (powershell) so that the ci warns me about invalid statements and I can correct the code.'
Proposed technical implementation details (optional)
For powershell modules we need an additional ci check. Currently syntax errors are not always covered. The ci for example does currently not cover usage of elif instead of elseif (former is python later is powershell).
Example shippables: https://app.shippable.com/github/ansible/ansible/runs/133592/1/console (source)
It erroneously reports unused variables instead of a syntax error.
What is the latest version of PSScriptAnalyzer at the point of writing
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず PowerShell モジュールの CI チェックを調べ、PowerShell が elseif を期待する箇所で elif を使用して、報告されたケースを再現します。得られた診断を意図された構文エラーの報告と比較します。この誤用が未使用変数としてのみ報告されるのではなく、CI によって検出されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- powershell
- 領域
- tooling
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100