PowerShell / PowerShell/PSScriptAnalyzer
PSShouldProcess Rule and module specific adaption
まだ誰も着手していません。
- 主要言語
- C#
- スター
- 2.2k
- フォーク
- 414
- 平均マージ
- 13時間 1分
- マージ済み PR(30日)
- 2
説明
Scenario
One of the default rules checks, whether a command that supports should process, actually uses ...
$PSCmdlet.ShouldProcess( ... )
Now, this is a great rule in principle, but in the framework module I maintain (https://psframework.org) I've got a cmdlet that replaces that method call (for readability and mocking reasons).
My current solution is to disable the specific script analyzer rule (PSShouldProcess) in my automatic tests. Which works well enough for my purposes.
But it would be more awesome if it were to detect the command and equate it with the method call (cause I'd actually appreciate having that check enabled, if it were practical).
Creating my own rule wouldn't be a problem, so my own projects would be covered. But since I'm trying to distribute this to others - with increasing success - distributing the custom rule to their tests would be ... inconvenient outside of PSScriptAnalyzer.
Questions
What's the policy on changes to rules that are module specific?
If I write that update, would it even be considered?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
PSShouldProcess ルールと issue に記載された自動テストから始めてください。ソースファイルやテストパスは指定されていません。完了には、モジュール固有のコマンド相当物に関する具体的なポリシーと合意された実装範囲を定め、その後、ルールが提案された適応を処理できることを示すテストを追加する必要があります。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp, powershell
- 領域
- tooling
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 30/100