-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Show default values of non-required options in help #17
Comments
To clarify the spec for this feature, how do we want to handle types without "nice" Another way to say this is that any of the types supported by the built in value conversions get nicely formatted default values and the rest are not guaranteed. @Tyrrrz, what do you think? |
Totally forgot about that :/ We could check if |
Yup, that sounds good. How do we want to handle types that do NOT override Ignore them? Print the type name? Print some placeholder value indicating a warning? Another option is adding a With that last option, we could add an analyzer that checks whether the type doesn't override |
Let's only handle these types: CliFx/CliFx/Domain/CommandArgumentSchema.cs Lines 37 to 50 in 7e4c6b2
That would break single source of truth, I don't like that. If the user decides to change the property type or the actual default value, they will have to remember to also update the default string value in attribute. |
Yeah, I don't like that either, but it would be mostly remedied by an analyzer catching it. Still not sure what behavior we want for the unsupported types... I think I'll print something like |
I vote we just don't do anything for unsupported types, i.e. leave the current behavior. |
I think I'm ok with that if we get an analyzer warning eventually 😎 |
@domn1995 after we merge this in, I'm gonna refactor code a bit so don't pick anything else until I'm done :) |
Suggested approach:
default
and show them in help textThe text was updated successfully, but these errors were encountered: