PowerShell / PowerShell/PSScriptAnalyzer
Feature Request: Version property in DiagnosticRecord object
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2.2k
- Forks
- 414
- Avg merge
- 13h 1m
- Merged PRs (30d)
- 2
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The request concerns DiagnosticRecord objects returned by Invoke-ScriptAnalyzer; start by locating that object and the invocation path that creates it. Confirm the running PSScriptAnalyzer version is exposed on recorded diagnostics and that the resulting property is available to callers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100