Skip to content

Conversation

mariam-abdulla
Copy link
Member

@mariam-abdulla mariam-abdulla commented Aug 19, 2025

This pull request introduces an improvement to the display of command line options in the testing platform command help. The main change is the addition of alphabetical sorting for options, making the help output more user-friendly and easier to scan.

Improvements to help output:

  • Added logic to sort each list of CommandLineOption objects alphabetically by their Name property in the GetAllOptions() method in TestingPlatformCommand.Help.cs.

Fixes #50349

@Copilot Copilot AI review requested due to automatic review settings August 19, 2025 15:02
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 implements alphabetical sorting of command-line options by name in the test command help output. This change improves the user experience by making options easier to find and scan through in a predictable order.

  • Adds alphabetical sorting of options by name using case-insensitive comparison
  • Applies sorting to all option lists in the built-in options dictionary

Copy link
Member

@Youssef1313 Youssef1313 left a comment

Choose a reason for hiding this comment

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

Do we have any tests to update or add?

@mariam-abdulla
Copy link
Member Author

Do we have any tests to update or add?

No tests to update. All tests should succeed.
For the adding part, I don't see this necessary.

@Youssef1313 Youssef1313 enabled auto-merge (squash) August 20, 2025 07:35
@Youssef1313
Copy link
Member

For the adding part, I don't see this necessary.

It has value IMO, but I'm fine to push it to later given the other priorities :)

@Youssef1313 Youssef1313 merged commit a9977cc into main Aug 20, 2025
28 checks passed
@Youssef1313 Youssef1313 deleted the dev/mabdullah/sort-options-alphabetically-in-dotnet-test-help branch August 20, 2025 08:59
@Youssef1313
Copy link
Member

/backport to release/10.0.1xx

Copy link
Contributor

Started backporting to release/10.0.1xx: https://github.com/dotnet/sdk/actions/runs/17121883648

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.

dotnet test -? (MTP) output should be sorted by option name
2 participants