GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||
GeezerVison is showing github.com — Preserve DSC resource names during alias correction by Copilot · Pull Request #2270 · PowerShell/PSScriptAnalyzer Conversation
|
There was an error while loading. Please reload this page.
| File | Description |
|---|---|
| Tests/Rules/AvoidUsingAlias.tests.ps1 | Adds formatting and command-analysis regression coverage. |
| Rules/AvoidAlias.cs | Adds DSC resource detection before implicit Get- prefix correction. |
Review effort: Balanced
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Co-authored-by: bergmeister <[email protected]>
Co-authored-by: bergmeister <[email protected]>
Co-authored-by: bergmeister <[email protected]>
Co-authored-by: bergmeister <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
DSC resource detection incorrectly suppresses alias diagnostics for executable commands and pipeline elements, while introducing quadratic scanning for ordinary scripts.
$result = Verb Argument {}, `$action = { Verb… · NewCommandExpressionAst exception accepts standalone blocks without checking that they belong to… · NewReview effort: Balanced
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
* Initial plan * Reject background pipelines as DSC resources Co-authored-by: bergmeister <[email protected]> * Guard background AST API for CoreCLR Co-authored-by: bergmeister <[email protected]> * Make background pipeline test expectations version-aware Co-authored-by: bergmeister <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: bergmeister <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Human assessment is needed because the following-line AST path can misclassify an executable cmdlet as configuration syntax and suppress an expected Get-Verb diagnostic.
No open issues 🎉
Review effort: Balanced
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The fallback AST handling can misclassify an executable command followed by a standalone block as a resource, suppressing a valid Get-Verb diagnostic; it needs the same alias and command-resolution checks as the same-line path, preserving the Node exception, plus a regression test.
Review effort: Balanced
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
* Initial plan * Guard following-line DSC resource detection Co-authored-by: bergmeister <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: bergmeister <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Human assessment is needed because separate-runspace command resolution can misclassify script-defined function callbacks as resource bodies, suppressing expected corrections.
No open issues 🎉
Review effort: Balanced
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The two-element exception in AvoidAlias.cs suppresses the Get-ChildItem correction for gci . followed by a next-line block, making alias handling inconsistent with same-line brace placement.
Review effort: Balanced
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
* Initial plan * Fix AvoidAlias DSC regression Co-authored-by: bergmeister <[email protected]> * Fix Windows Pester expected alias count Co-authored-by: bergmeister <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: bergmeister <[email protected]>
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
No active review issues are reported for the change preventing alias correction from rewriting DSC resource names.
No open issues 🎉
Review effort: Balanced
Sorry, something went wrong.
There was an error while loading. Please reload this page.
At least 1 approving review is required to merge this pull request.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Auto Correct Aliases incorrectly expands DSC resources name thinking its an alias of a cmdlet
There was an error while loading. Please reload this page.