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

Print paramLabel only when it could exist #1404

Merged
merged 1 commit into from
Sep 28, 2021
Merged

Print paramLabel only when it could exist #1404

merged 1 commit into from
Sep 28, 2021

Conversation

joca-bt
Copy link
Contributor

@joca-bt joca-bt commented Aug 5, 2021

We shouldn't print paramLabels for options with arity 0.

@remkop
Copy link
Owner

remkop commented Aug 6, 2021

Can you give some detail about what you are currently seeing that is different from what you expected to see? Ideally with an example that can be reproduced.

Also, I’m a bit surprised that all tests still pass with this change. (Away from my PC, cannot check.) Does that mean that this area isn’t covered by any tests? Maybe we should take this opportunity to add tests if that’s the case.

@joca-bt
Copy link
Contributor Author

joca-bt commented Aug 6, 2021

For example:

Before fix:
option '--help' (<help>) should be specified only once

After fix:
option '--help' should be specified only once

This message really annoyed me :D

@remkop
Copy link
Owner

remkop commented Aug 7, 2021

Thanks for the clarification.
Can we add some tests to the pull request?

@joca-bt
Copy link
Contributor Author

joca-bt commented Aug 7, 2021

Do you mind adding them? Won't have time to do that anytime soon.

@remkop
Copy link
Owner

remkop commented Aug 8, 2021

Do you mind adding them? Won't have time to do that anytime soon.

I currently have almost no time to spend on picocli.
If you don't have time either that is fine of course.
This will just have to wait until someone can add some tests.

@remkop remkop added type: bug 🐛 type: enhancement ✨ theme: usagehelp An issue or change related to the usage help message labels Sep 28, 2021
@remkop remkop added this to the 4.6.2 milestone Sep 28, 2021
@remkop remkop merged commit 267669a into remkop:master Sep 28, 2021
@remkop
Copy link
Owner

remkop commented Sep 28, 2021

Merged. Thank you for the contribution!

MarkoMackic pushed a commit to MarkoMackic/picocli that referenced this pull request Oct 17, 2021
MarkoMackic added a commit to MarkoMackic/picocli that referenced this pull request Oct 17, 2021
MarkoMackic added a commit to MarkoMackic/picocli that referenced this pull request Oct 17, 2021
remkop added a commit that referenced this pull request Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: usagehelp An issue or change related to the usage help message type: bug 🐛 type: enhancement ✨
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants