PowerShell / PowerShell/PSScriptAnalyzer
Feature Request: Version property in DiagnosticRecord object
还没有人认领这个 Issue。
- 主要语言
- C#
- 星标
- 2.2k
- 派生
- 414
- 平均合并
- 13 小时 1 分钟
- 30 天内合并 PR
- 2
描述
Spec:
[System.Version] $Version
Stores the version of PSScriptAnalyzer that ran in the Invoke-ScriptAnalyzer test.
Scenario:
I need to know which version of PSScriptAnalyzer ran in my Invoke-ScriptAnalyzer test.
Different versions of PSScriptAnalyzer behave differently. They include different rules and the rules change (see PSPlaceOpenBrace 1.10.0 v. 1.11.0).
This is especially important because you cannot remove an assembly from a PS session. I don't know if this script passed because it's perfect or it passed because I accidentally ran an older version that is missing current rules.
Also, there's no log for script analyzer, so I might log the DiagnosticRecord objects. In that case, the version is critical.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
此请求涉及 Invoke-ScriptAnalyzer 返回的 DiagnosticRecord 对象;首先定位该对象以及创建它的调用路径。确认正在运行的 PSScriptAnalyzer 版本会在记录的诊断信息中公开,并且生成的属性可供调用方使用。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- csharp, powershell
- 领域
- devtools
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100