Skip to content

Conversation

adityapatwardhan
Copy link
Member

PR Summary

This pull request introduces an enhancement to the TryGetMergedParameters method in src/Common/MergeUtils.cs to improve how parameter descriptions are handled during the merge process. The changes ensure better diagnostics and more accurate merging of parameter descriptions.

Enhancements to parameter merging:

  • Added logic to check if a parameter's description in the help matches a predefined template (FillInParameterDescriptionTemplate). If it does, a warning diagnostic is logged, and the description falls back to the command's description.
  • Introduced a conditional check to identify and handle cases where the help description differs from the command description. In such cases, the descriptions are concatenated, and an informational diagnostic is logged.
  • Updated the newParameter object to use the resolved description variable instead of directly using the help description, ensuring the merged description reflects the new logic.

PR Context

Fixes #751

@adityapatwardhan
Copy link
Member Author

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Collaborator

@sdwheeler sdwheeler left a comment

Choose a reason for hiding this comment

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

LGTM

@adityapatwardhan adityapatwardhan merged commit a434c5c into v2 Jun 26, 2025
8 checks passed
@adityapatwardhan adityapatwardhan deleted the UpdateMD branch June 26, 2025 23:31
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