-
Notifications
You must be signed in to change notification settings - Fork 4
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
Implement @CommandDefault
#27
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Don't think there's much holding this back, just wanted to open a PR just in case. |
Is it checked somewhere that |
It's done as a runtime check Line 505 in 2e5536e
|
I realised just as I pushed that I forgot to switch branches for github action change. Meh. |
Merged
* Small refactoring * Nullable _defaultCommand * [Super pedantic] Keeping the code style similar Don't worry too much about following my archaic style, it was just so it wasn't bothering me that parts of the function used "this." and some parts didn't. * [Ultra pedantic] I missed one. * Implement @ArgValidator (#29) * Implement @ArgValidator * Fix example * Help text tweaks (#26) * Closes #7 and closes #11 * Make error messages a bit more standard looking * Fix crash when there's positional args but no names for them * Closes #8 * Give positional args a default name if one isn't provided * misc fix * Make the "missing arg" error look better * Add the app name into the Usage: line * Remove some unused imports * HelpTextBuilderSimple now supports arg groups * Allow arg groups to have descriptions * Add a new line between arg content * Closes #20 * Add some docs * Forgive this sin, but it's in the interest of correctly ordered help text * Accidentally reverted #8 * Unbreak things (I hope) * Small refactoring * Nullable _defaultCommand * Add getSymbolsByUDAInModules * Proper validation of at most one @ComandDefault Co-authored-by: Bradley Chatha <bradley@chatha.dev>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TLDR;
@Command(null, "desc")
->@CommandDefault("desc")
Old syntax now fails an assert with a user-friendly message:
Closes #6