Skip to content

Updates output to present the string representation of command arguments to a wrapped text block #791

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

heckj
Copy link
Contributor

@heckj heckj commented Jun 30, 2025

Arguments switched from a single long line within a preformatted text block to multilines and wrapped to a line length. This makes the output significantly easier to read when there's a large number of options (for example, the swift build command). The wrapping algorithm is a simple greedy algorithm that extends up to, but not beyond, a maximum text width.

The line length is defined by the style of output (markdown: 80, docc: 60)

  • Snapshot tests for output updated to reflect changes

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

@heckj heckj requested a review from rauhul June 30, 2025 20:23
@heckj heckj self-assigned this Jun 30, 2025
Copy link
Contributor

@rauhul rauhul left a comment

Choose a reason for hiding this comment

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

Seems great to me, let's have Nate take a look before merging :)

Arguments switched from a single long line within a preformatted text
block to multilines and wrapped to a line length. This makes the output
significantly easier to read when there's a large number of options
(for example, the `swift build` command). The wrapping algorithm is
a simple greedy algorithm that extends up to, but not beyond, a
maximum text width.

The line length defined by the style of output (markdown - 80, docc - 60)
- Snapshot tests for output updated to reflect changes
@heckj heckj force-pushed the docc-options-list-update branch from 3d160f6 to a33d4af Compare July 1, 2025 00:11
@heckj
Copy link
Contributor Author

heckj commented Jul 1, 2025

(rebased the formatting into the commit and reset over top of tree)

@heckj heckj requested a review from natecook1000 July 1, 2025 00:12
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