GenerateDoccReference: group arguments by section like CLI help#885
GenerateDoccReference: group arguments by section like CLI help#885amanthatdoescares wants to merge 3 commits intoapple:mainfrom
Conversation
Partition dump-help arguments into Arguments, custom sectionTitle groups (first-seen order), and Options, and emit matching markdown headings. Update DocC reference snapshots.
|
Hello @amanthatdoescares hope you are doing great. Thank you for your contribution on this part of the project. I have already managed to solve this task and prevously opened a pr and requested a review from @natecook1000. I took a look and your core implementation and mine are quite similar in approach. But I think the team was busy and didn’t have time to review. I respect whatever decision @natecook1000 and the team make about which PR to move forward with. I’m happy to adjust or rebase my PR or close it in favor of this one if that’s preferred. Just wanted to make sure the earlier work is visible in case it’s useful for the review. |
Hey @Chamepp, thanks for reaching out! I did actually come across your PR before working on this — it was helpful to see your approach and the screenshots you attached. Our implementations ended up being pretty similar, which makes sense given the problem. Let's leave it to Natecook1000 and the team to decide which direction they'd like to go. Happy to collaborate or make any adjustments they think are needed. Appreciate you being so gracious about it! |
Partition dump-help arguments into Arguments, custom sectionTitle groups (first-seen order), and Options, and emit matching markdown headings. Update DocC reference snapshots.
This addresses [issue #722]: generated DocC/GitHub Markdown previously listed every argument in a single block. This change uses it so that the output matches the section order used by command-line help.
Implementation is confined to Tools/generate-docc-reference/Extensions/ArgumentParser+Markdown.swift. Existing GenerateDoccReferenceTests snapshot baselines were refreshed to reflect the new headings.
Checklist