Align hangdump type help with validator#8524
Merged
Merged
Conversation
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix help message for hangdump type options
Align hangdump type help with validator
May 23, 2026
Member
|
@copilot resolve the merge conflicts in this pull request |
Contributor
There was a problem hiding this comment.
Pull request overview
Aligns --hangdump-type help text and invalid-argument messaging with the target-specific validator in the HangDump extension, so the advertised valid values match what is actually accepted per TFM.
Changes:
- Centralized formatting of the valid-value list for
--hangdump-typeinHangDumpCommandLineProviderand wired it into help + validation error messages. - Updated HangDump resource strings to accept formatted option lists and refreshed localized XLF files accordingly.
- Added/updated unit + acceptance tests to cover
Nonevalidity, TFM-specific help output, and invalid-value messaging.
Show a summary per file
| File | Description |
|---|---|
| test/UnitTests/Microsoft.Testing.Extensions.UnitTests/HangDumpTests.cs | Adds unit coverage for None, option description valid-value list, and updated invalid-type message formatting. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HelpInfoAllExtensionsTests.cs | Updates --help/--info expectations to use TFM-specific hangdump valid-value list. |
| test/IntegrationTests/Microsoft.Testing.Platform.Acceptance.IntegrationTests/HangDumpTests.cs | Updates invalid --hangdump-type output expectation to match new formatting/order. |
| src/Platform/Microsoft.Testing.Extensions.HangDump/Resources/xlf/ExtensionResources.zh-Hant.xlf | Updates localized resource entries for the new formatted placeholders. |
| src/Platform/Microsoft.Testing.Extensions.HangDump/Resources/xlf/ExtensionResources.zh-Hans.xlf | Updates localized resource entries for the new formatted placeholders. |
| src/Platform/Microsoft.Testing.Extensions.HangDump/Resources/xlf/ExtensionResources.tr.xlf | Updates localized resource entries for the new formatted placeholders. |
| src/Platform/Microsoft.Testing.Extensions.HangDump/Resources/xlf/ExtensionResources.ru.xlf | Updates localized resource entries for the new formatted placeholders. |
| src/Platform/Microsoft.Testing.Extensions.HangDump/Resources/xlf/ExtensionResources.pt-BR.xlf | Updates localized resource entries for the new formatted placeholders. |
| src/Platform/Microsoft.Testing.Extensions.HangDump/Resources/xlf/ExtensionResources.pl.xlf | Updates localized resource entries for the new formatted placeholders. |
| src/Platform/Microsoft.Testing.Extensions.HangDump/Resources/xlf/ExtensionResources.ko.xlf | Updates localized resource entries for the new formatted placeholders. |
| src/Platform/Microsoft.Testing.Extensions.HangDump/Resources/xlf/ExtensionResources.ja.xlf | Updates localized resource entries for the new formatted placeholders. |
| src/Platform/Microsoft.Testing.Extensions.HangDump/Resources/xlf/ExtensionResources.it.xlf | Updates localized resource entries for the new formatted placeholders. |
| src/Platform/Microsoft.Testing.Extensions.HangDump/Resources/xlf/ExtensionResources.fr.xlf | Updates localized resource entries for the new formatted placeholders. |
| src/Platform/Microsoft.Testing.Extensions.HangDump/Resources/xlf/ExtensionResources.es.xlf | Updates localized resource entries for the new formatted placeholders. |
| src/Platform/Microsoft.Testing.Extensions.HangDump/Resources/xlf/ExtensionResources.de.xlf | Updates localized resource entries for the new formatted placeholders. |
| src/Platform/Microsoft.Testing.Extensions.HangDump/Resources/xlf/ExtensionResources.cs.xlf | Updates localized resource entries for the new formatted placeholders. |
| src/Platform/Microsoft.Testing.Extensions.HangDump/Resources/ExtensionResources.resx | Changes strings to accept formatted valid-value lists ({0} / {1}). |
| src/Platform/Microsoft.Testing.Extensions.HangDump/HangDumpCommandLineProvider.cs | Implements shared formatting for valid dump types and uses it in option description + validation errors. |
Copilot's findings
- Files reviewed: 18/18 changed files
- Comments generated: 1
Co-authored-by: Evangelink <11340282+Evangelink@users.noreply.github.com>
Contributor
Author
Resolved by merging |
Address Copilot review feedback: the previous formatter interpolated hard-coded English 'or'/'and' conjunctions into localized resource strings, leaking English into non-English help and validation output. Switch to a single comma-separated list (e.g., ''Mini', 'Heap', 'Full', 'None''), which is locale-neutral and lets us collapse the two former constants/helpers into one. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--hangdump-typehelp and validation advertised values that did not match the target-specific validator. Non-NETCOREAPPtargets were toldTriagewas valid, whileNonewas described as .NET 6+-only despite being accepted.HangDumpTypeOptions, the same target-specific list used by validation.Triagelimited toNETCOREAPP.Noneadvertised wherever it is accepted.Resources and localization
Tests
None, target-specific help text, and invalid-value messages.--helpand invalid--hangdump-typeoutput.