Repository navigation
Fix duplicate results from Get-Command fuzzy matching - #28042
Dongbo Wang (daxian-dbw) merged 1 commit into
Conversation
Filter fuzzy module candidates before adding them to the scored output collection, and cover duplicate module discovery with a focused regression test. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
All reviewed changes are covered by the supplied validation and have no unresolved blocking issues.
Review effort: Lite
Findings: None
What changed in this PR
Fixes duplicate results from fuzzy Get-Command matching while preserving candidate scores.
Changes:
- Filters duplicate fuzzy candidates using existing checks.
- Adds cross-platform regression coverage.
| File | Description |
|---|---|
test/powershell/Modules/Microsoft.PowerShell.Utility/Get-Command.Tests.ps1 |
Adds duplicate-result regression coverage. |
src/System.Management.Automation/engine/GetCommandCommand.cs |
Filters fuzzy candidates and retains scores. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Ryan Yates (kilasuit)
left a comment
There was a problem hiding this comment.
LGTM - tested a local build of this branch too and all good there
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
Justin Chung (jshigetomi)
left a comment
There was a problem hiding this comment.
Reviewed the fuzzy candidate filtering, score preservation, duplicate handling, and regression coverage. Looks good to me.
bd8cb01
into
PowerShell:master
Summary
Fixes #26593
Note: It's much easier to review the PR by ignoring the whitespace changes: https://github.com/PowerShell/PowerShell/pull/28042/changes?w=1
Get-Commandduplicate and parameter checks before adding them to scored output