Skip to content
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

Consistently wrap help and subcommand messages(with refactoring) #2174

Merged
merged 1 commit into from
Oct 25, 2020

Conversation

ldm0
Copy link
Member

@ldm0 ldm0 commented Oct 16, 2020

Closes #2170

First commit and the third refactored the arg writing and subcomand writing without changing clap's behaviour. Which is needed because I think these code is a bit rotten(unnecessary side effects occurred in output functions).

Second commit introduces the help message wrap checking(refractoring above make proving the wrap checking's correctness a lot easier).

@ldm0 ldm0 marked this pull request as draft October 17, 2020 03:21
@ldm0 ldm0 changed the title Consistently wrap help and subcommand messages Consistently wrap help and subcommand messages(with refactoring) Oct 17, 2020
@ldm0 ldm0 marked this pull request as ready for review October 17, 2020 05:09
Copy link
Member

@pksunkara pksunkara left a comment

Choose a reason for hiding this comment

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

Sorry took me a bit of time to review.

src/output/help.rs Outdated Show resolved Hide resolved
src/output/help.rs Show resolved Hide resolved
src/output/help.rs Outdated Show resolved Hide resolved
src/output/help.rs Show resolved Hide resolved
src/output/help.rs Outdated Show resolved Hide resolved
src/output/help.rs Outdated Show resolved Hide resolved
@ldm0 ldm0 marked this pull request as draft October 25, 2020 11:11
@ldm0 ldm0 force-pushed the wrap_help branch 2 times, most recently from 8ebb6a3 to 3aa89ce Compare October 25, 2020 11:23
@ldm0 ldm0 marked this pull request as ready for review October 25, 2020 12:20
@ldm0 ldm0 force-pushed the wrap_help branch 3 times, most recently from 1ec60b1 to bf61169 Compare October 25, 2020 13:10
@ldm0
Copy link
Member Author

ldm0 commented Oct 25, 2020

Done. Now it's easier to review. (Relatively XD)

@ldm0 ldm0 requested a review from pksunkara October 25, 2020 16:54
Copy link
Member

@pksunkara pksunkara left a comment

Choose a reason for hiding this comment

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

I updated your code a bit. There's still a little bit inefficiency but I will deal with it later.

@pksunkara
Copy link
Member

bors r+

@bors
Copy link
Contributor

bors bot commented Oct 25, 2020

🕐 Waiting for PR status (Github check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@bors
Copy link
Contributor

bors bot commented Oct 25, 2020

Build succeeded:

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.

Regression in wrapping help
2 participants