PowerShell / PowerShell/PSScriptAnalyzer
Rule for unused rule suppressions
オープン
まだ誰も着手していません。
Area - Rules
Issue-Enhancement
Up-for-Grabs
- 主要言語
- C#
- スター
- 2.2k
- フォーク
- 414
- 平均マージ
- 13時間 1分
- マージ済み PR(30日)
- 2
説明
Currently there are quiet some reason to suppress a certain rule as e.g.:
- Not be able to (easily) work around an issue
- False positives
There are also a few reasons a rule suppression might get obsolete, e.g.:
- The script issue gets resolved
e.g. all theWrite-Hostcmdlet are been replaced which a different cmdlet - The script issue doesn't anymore apply
e.g. aPSReviewUnusedParameterparameter get completely depreciated or a variable gets (also) used in scope - PSScriptAnalyzer update
e.g. a false positive might get fixed in a newer version of PSScriptAnalyzer
In all the situations I would like to be warned that there is a Diagnostics.CodeAnalysis.SuppressMessageAttribute that is no longer required.
This will avoid a scenario were:
- Someone resolves an analyzer issue (e.g.
PSAvoidUsingWriteHost) in a particular script but forgets to remove theSuppressMessageAttributefrom the annotations - Someone else updates the same script but unseen reintroduces the analyzer issue (e.g.
Write-Host) again.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
ファイル、テスト、エントリポイントは指定されていません。まず、Diagnostics.CodeAnalysis.SuppressMessageAttribute とアナライザーの診断がどのように処理されているかを特定し、次に、列挙されたシナリオで古い抑制をどのように検出して報告するかを定義してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp, powershell
- 領域
- tooling
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100