PowerShell / PowerShell/PSScriptAnalyzer

Rule severity vs diagnostic severity

オープン
#1,611 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

API Proposal Consider - 2.0 Issue - Discussion
主要言語
C#
スター
2.2k
フォーク
414
平均マージ
13時間 1分
マージ済み PR(30日)
2

説明

From https://github.com/PowerShell/PSScriptAnalyzer/issues/1610.

One consideration that comes up when authoring rules is:

  • Rules can have a "severity"
  • The individual diagnostics can also have a "severity"

When we configure things, this creates the issue of:

  • Does a configured severity refer to a filter on rules or diagnostics?
  • If it's rules, how do rules perform broad analysis on a topic area and possibly output diagnostics of different severity?
    • Should rules designate their severity as the highest severity they may emit? If so, how do we enforce that statically?
  • If it's diagnostics, how do we ensure rules are run efficiently? If we can't statically determine ahead of time which rules will emit diagnostics of the right severity, are we forced to always run all the rules?

We could potentially offer both configurations, but I personally think this is an unhelpful level of granularity to offer to users, since we should work to make the concept of Severity a simple and monolithic one.

My current view on this is:

  • Configured severity refers to rules to run
  • Rules should be marked with the highest severity they can emit
  • We should run all such rules and then filter out any diagnostics of unwanted severities

But that's just while I'm thinking on it now, and I'd like to open this question up for discussion

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、リンクされている PSScriptAnalyzer の issue #1610 と、こちらの重大度に関する議論を読んでください。プロジェクトに、判断の根拠となる既存のルールまたは診断の重大度設定があるかどうかを確認してください。この issue では、合意された重大度モデルも実装範囲も指定されていないため、完了にはその両方が必要です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp, powershell
領域
tooling
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。