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

Inconsistencies in punctuation of flag description #830

Closed
rkpattnaik780 opened this issue Jul 21, 2021 · 8 comments · Fixed by #860
Closed

Inconsistencies in punctuation of flag description #830

rkpattnaik780 opened this issue Jul 21, 2021 · 8 comments · Fixed by #860
Labels
documentation Improvements or additions to documentation

Comments

@rkpattnaik780
Copy link
Contributor

Current scenario

There are some inconsistencies regarding use of periods in flag descriptions. Some flags end with period and some don't. As suggested by @craicoverflow we shouldn't use periods as the flags provided by cobra (--default and --help) don't use them too.

Screenshot from 2021-07-09 17-07-07

Proposal

Remove full stops from description of all flags.

@rkpattnaik780 rkpattnaik780 added the documentation Improvements or additions to documentation label Jul 21, 2021
@rkpattnaik780
Copy link
Contributor Author

@bhardesty what's your take on this issue?

@ankithans
Copy link
Contributor

ankithans commented Jul 21, 2021

can be tackled through Charmil validator in future! Can add a rule for this.
cc: @wtrocki

@rkpattnaik780
Copy link
Contributor Author

can be tackled through Charmil validator in future! Can add a rule for this.

Thanks @ankithans :). That will be great.

@wtrocki
Copy link
Collaborator

wtrocki commented Jul 21, 2021

Great idea. We need to fix multiple commands that have missing descriptions etc. See #777

@bhardesty
Copy link
Contributor

We should try to be consistent. However, some flag descriptions have multiple sentences, so they should end with a full stop.

How do the "default" and "choose from" values work? I think they're generated by cobra and appended to the end of the flag description. Can you control the punctuation? Here's an example of a description with both:

-o, --output string
  Format in which to display the Kafka instance. Choose from: "json", "yml", "yaml" (default "json")

I'll raise this with the rest of the docs team next time that we meet, and report back with a recommendation.

@rkpattnaik780
Copy link
Contributor Author

rkpattnaik780 commented Jul 21, 2021

Can you control the punctuation?

Seems the punctuation can be controlled.
Taking a quick look at other CLIs, full stops are not that popular with flags.

@wtrocki
Copy link
Collaborator

wtrocki commented Jul 21, 2021

Checked couple popular clis. Punctuations aren't used for flags for those.

@bhardesty
Copy link
Contributor

To follow up, I think we can remove the periods. There are only a couple descriptions with multiple sentences, and I think they can be revised to just be a single sentence (without a period).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants