Repository navigation
Reject background pipelines as DSC resources - #2290
Merged
Christoph Bergmeister (bergmeister) merged 4 commits intoOct 29, 2026
Merged
Christoph Bergmeister (bergmeister) merged 4 commits into
Christoph Bergmeister (bergmeister) merged 4 commits into
Conversation
Co-authored-by: bergmeister <9250262+bergmeister@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix code as per comments in review thread
Reject background pipelines as DSC resources
Oct 28, 2026
Christoph Bergmeister (bergmeister)
removed this pull request from stack #2291
October 29, 2026 00:12
Co-authored-by: bergmeister <9250262+bergmeister@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Unconditional test counts fail in Windows PowerShell 5.1 CI because the new guarded cases are excluded, so expectations must be version-dependent or the added cases moved to PowerShell 6+ tests.
1 open issue
What changed in this PR
This PR corrects fallback DSC resource detection so background pipelines remain eligible for alias expansion and missing Get- prefix corrections.
Changes:
- Reject background command pipelines and background following-line body pipelines as DSC resources.
- Add regression cases for both forms and update diagnostic counts.
| File | Description |
|---|---|
| Tests/Rules/AvoidUsingAlias.tests.ps1 | Adds same-line and following-line background pipeline regressions. |
| Rules/AvoidAlias.cs | Adds Core-only background pipeline checks to DSC resource detection. |
Review effort: Balanced
Co-authored-by: bergmeister <9250262+bergmeister@users.noreply.github.com>
Christoph Bergmeister (bergmeister)
removed this pull request from stack #2292
October 29, 2026 09:10
Christoph Bergmeister (bergmeister)
marked this pull request as ready for review
October 29, 2026 09:10
Christoph Bergmeister (bergmeister)
requested a review
from a team
as a code owner
October 29, 2026 09:10
Christoph Bergmeister (bergmeister)
merged commit Oct 29, 2026
3b14fd8
into
copilot/fix-auto-correct-aliases
9 checks passed
Christoph Bergmeister (bergmeister)
deleted the
copilot/fix-comments-in-review-thread
branch
October 29, 2026 09:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Background pipelines inside fallback configuration ASTs could be mistaken for DSC resource declarations, suppressing expected
Get-corrections.&forms, including:Verb Argument {} & gci . {} &