-
Notifications
You must be signed in to change notification settings - Fork 111
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
RSDK-9285 - add style guide and contribution guide #4722
Conversation
@purplenicole730 I tried to include the improvements from #4692 but please let me know if you think I missed anything here! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THANK YOU FOR THIS!!! Hopefully this makes it so that standardizing CLI usage will never happen again (or minimally) 😅
Should we also be pointing out to use DefaultText
option? There have been many times when it was ignored.
cli/STYLEGUIDE.md
Outdated
}, | ||
}, | ||
+ UsageText: createUsageText("my-parent-command my-child-command", []string{requiredFlag}, true, false), | ||
- UsageText: createUsageText("my-child-command", []string{requiredFlag, optionalFlag}, true, false), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
technically this should be
UsageText: createUsageText("my-child-command", []string{requiredFlag, optionalFlag}, false, false),
since my-child-command
doesn't have any other flags. I think it would be nice to show that change as well
``` | ||
</details> | ||
|
||
## Create Usage Text With Helper Func, Only Specify Required Args |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also add a section for using the other helper function that introduces multiple accepted values? formatAcceptedValues
is a function that Gloria introduced and I've since made it more generic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beautiful! I hope this helps guide many developers in the future so that our CLI will be readable for everyone!
Add style guide and contributing guide to the CLI.