PowerShell / PowerShell/PSScriptAnalyzer
Make custom rule name consistent
オープン
まだ誰も着手していません。
Area - Rules
Consider - 2.0
- 主要言語
- C#
- スター
- 2.2k
- フォーク
- 414
- 平均マージ
- 13時間 1分
- マージ済み PR(30日)
- 2
説明
Apologies if I am repeating something or if this has been discussed already. This is mostly an re-iteration of https://github.com/PowerShell/PSScriptAnalyzer/issues/1140#issuecomment-488251888
As of now, custom rule names are inconsistent across various places.
- At first, there are no indication about function name in the ScriptRuleDocumention.md . But PSSA is completely depends on
$MyInvocation.InvocationNamefor rule/violation name - I can not really have a customized rule name, it should be the name of the PS function. That gives me a weird naming of rules like
Measure-Something. On the other I can ship the violation with whatever name I like which has no value and can break things. - While suppressing a custom rule, I will have to provide
<ModuleName>\<RuleName>. That would end up something like,FooBar\Measure-Something- I really do not like this convention as I do not want the developer to be aware of the module name or the function name.
- It gets worst further, While filtering a rule, I can not follow the same convention, it has to be the name whatever the function name.
Invoke-ScriptAnalyzer -IncludeRule Measure-Something -ExcludeRule Measure-SomethingElse
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
ScriptRuleDocumentation.md と、ここで説明されている Invoke-ScriptAnalyzer IncludeRule/ExcludeRule および suppression の動作から始め、これまでの経緯についてはリンク先の issue の議論を確認してください。カスタムルールの命名規則が決定され、ドキュメント、違反名、suppression、フィルタリング全体に一貫して適用されていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- powershell
- 領域
- tooling
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 30/100