Skip to content

Reorders CLI options and subcommands to show alphabetically#1171

Merged
waldekmastykarz merged 5 commits intodotnet:mainfrom
bartizan:reorder-cli-commands-options
May 12, 2025
Merged

Reorders CLI options and subcommands to show alphabetically#1171
waldekmastykarz merged 5 commits intodotnet:mainfrom
bartizan:reorder-cli-commands-options

Conversation

@bartizan
Copy link
Copy Markdown
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
Copy Markdown
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
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

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.

3 participants