Skip to content

Reorders CLI options and subcommands to show alphabetically #1171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 12, 2025

Conversation

Bartizan
Copy link
Contributor

@Bartizan Bartizan marked this pull request as ready for review May 11, 2025 08:10
@Bartizan Bartizan requested a review from a team as a code owner May 11, 2025 08:10
@waldekmastykarz
Copy link
Collaborator

Thank you! We'll review it asap

@waldekmastykarz waldekmastykarz self-assigned this May 12, 2025
@waldekmastykarz waldekmastykarz requested a review from Copilot May 12, 2025 11:20
Copy link
Contributor

@Copilot 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

This PR reorders CLI commands and options alphabetically and integrates plugin-provided commands and options into the CLI.

  • Updated ProxyHost to receive and sort plugin options and commands alphabetically.
  • Adjusted the Program startup to pass streamlined plugin data.
  • Added helper extension methods in CommandLineExtensions to support alphabetical ordering and simplified command/option additions.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
dev-proxy/ProxyHost.cs Modified root command creation to sort options/commands and include plugins.
dev-proxy/Program.cs Refactored initialization to work with the new sorted plugin options and commands.
dev-proxy-abstractions/CommandLineExtensions.cs Added extension methods for ordering and adding CLI components to commands.
Comments suppressed due to low confidence (1)

dev-proxy/ProxyHost.cs:400

  • [nitpick] The variable 'jwtCommand' is declared but never used, which may be confusing. Consider removing it if it is not needed.
var jwtCommand = new Command("jwt", "Manage JSON Web Tokens");

@waldekmastykarz waldekmastykarz enabled auto-merge (squash) May 12, 2025 13:22
@waldekmastykarz waldekmastykarz merged commit 102b51e into dotnet:main May 12, 2025
4 checks passed
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.

2 participants