PowerShell / PowerShell/vscode-powershell
Accept multiple suggested corrections from PSScriptAnalyzer
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 547
- PR merge metrics
- No merged PRs in 30d
Description
VSCode seems to be bomb out if a diagnostic records have multiple elements within it's SuggestedCorrections property; despite the property being specified as plural and of type ObjectModel.Collection containing [PowerShell.ScriptAnalyzer.Generic.CorrectionExtent].
This almost seems like a bug, but maybe it was just overlooked as generally there is only a single suggested correction (if any). I am currently implementing many custom rules which should always contain a suggested correction that suppresses the diagnostic record and if applicable, the fix that can be applied.
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
Start by reproducing the VS Code failure with a PSScriptAnalyzer diagnostic whose SuggestedCorrections collection contains multiple CorrectionExtent elements. Trace how the extension handles that property; done means diagnostics with multiple suggested corrections no longer cause VS Code to fail and the corrections are handled appropriately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, typescript, vscode
- Domain
- developer-experience, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100