chore: remove dead CommandLineParser dependency#1791
Merged
Conversation
Spectre.Console.Cli is the active CLI parser. The CommandLineParser package and IArgumentHelper/ArgumentHelper types had no remaining callers. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Removes the legacy CommandLineParser dependency and its unused IArgumentHelper/ArgumentHelper abstraction from the Orchestrator, aligning the codebase with the current Spectre.Console.Cli-based CLI parsing approach.
Changes:
- Removed the
CommandLineParserNuGet reference from the Orchestrator project. - Deleted
IArgumentHelperandArgumentHelper(no longer referenced). - Removed the DI registration for the deleted abstraction and the central package version entry.
Show a summary per file
| File | Description |
|---|---|
| src/Microsoft.ComponentDetection.Orchestrator/Microsoft.ComponentDetection.Orchestrator.csproj | Drops the unused CommandLineParser package reference. |
| src/Microsoft.ComponentDetection.Orchestrator/IArgumentHelper.cs | Deletes the unused interface that depended on CommandLineParser. |
| src/Microsoft.ComponentDetection.Orchestrator/ArgumentHelper.cs | Deletes the unused implementation that wrapped CommandLineParser. |
| src/Microsoft.ComponentDetection.Orchestrator/Extensions/ServiceCollectionExtensions.cs | Removes DI registration for the deleted helper types. |
| Directory.Packages.props | Removes the central CommandLineParser version entry. |
Copilot's findings
- Files reviewed: 5/5 changed files
- Comments generated: 0
grvillic
approved these changes
Apr 17, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1791 +/- ##
============================
============================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
What
Removes the unused
CommandLineParserNuGet package and theIArgumentHelper/ArgumentHelperabstraction it backed.Why
Spectre.Console.Clihas been the active CLI parser since the migration away fromCommandLineParser. The old types are no longer referenced by any production or test code — only by their own DI registration.Confirmed with
rg "IArgumentHelper|ArgumentHelper|using CommandLine" src test: only matches were the three files removed/edited here.Changes
ArgumentHelper.cs,IArgumentHelper.csservices.AddSingleton<IArgumentHelper, ArgumentHelper>()fromServiceCollectionExtensions.csCommandLineParserPackageReference and PackageVersion entriesPart 1 of a 6-PR cleanup series removing .NET-Framework-era anachronisms.