Skip to content

chore: remove dead CommandLineParser dependency#1791

Merged
JamieMagee merged 1 commit into
mainfrom
cleanup/remove-commandlineparser
Apr 17, 2026
Merged

chore: remove dead CommandLineParser dependency#1791
JamieMagee merged 1 commit into
mainfrom
cleanup/remove-commandlineparser

Conversation

@JamieMagee
Copy link
Copy Markdown
Member

What

Removes the unused CommandLineParser NuGet package and the IArgumentHelper / ArgumentHelper abstraction it backed.

Why

Spectre.Console.Cli has been the active CLI parser since the migration away from CommandLineParser. 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

  • Delete ArgumentHelper.cs, IArgumentHelper.cs
  • Drop services.AddSingleton<IArgumentHelper, ArgumentHelper>() from ServiceCollectionExtensions.cs
  • Remove CommandLineParser PackageReference and PackageVersion entries

Part 1 of a 6-PR cleanup series removing .NET-Framework-era anachronisms.

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>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 CommandLineParser NuGet reference from the Orchestrator project.
  • Deleted IArgumentHelper and ArgumentHelper (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

@JamieMagee JamieMagee merged commit 79997f5 into main Apr 17, 2026
29 of 31 checks passed
@JamieMagee JamieMagee deleted the cleanup/remove-commandlineparser branch April 17, 2026 19:52
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.0%. Comparing base (87ae1f8) to head (6ccc9fa).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff      @@
##   main   #1791   +/-   ##
============================
============================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants