PowerShell / PowerShell/PSScriptAnalyzer
Rule severity vs diagnostic severity
還沒有人認領這個 Issue。
- 主要語言
- C#
- 星號
- 2.2k
- 分支
- 415
- 平均合併
- 13 小時 1 分鐘
- 30 天內合併 PR
- 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
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
首先閱讀連結的 PSScriptAnalyzer issue #1610,以及此處關於嚴重性的討論。確認專案是否已有可作為決策依據的規則或診斷嚴重性設定;要完成此 issue,需要一個已達成共識的嚴重性模型和實作範圍,但此 issue 兩者皆未指定。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- csharp, powershell
- 領域
- tooling
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100