-
Notifications
You must be signed in to change notification settings - Fork 401
Fluent APIs are not allowed in non-builder types #1994
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
Conversation
Should the ArgumentValidation.AcceptExistingOnly and OptionValidation.AcceptExistingOnly methods likewise return void? |
Co-authored-by: David Cantú <[email protected]>
@@ -372,10 +372,8 @@ public void Option_of_enum_can_limit_enum_members_as_valid_values() | |||
[Fact] | |||
public void Option_of_T_fluent_APIs_return_Option_of_T() |
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.
You might as well remove the test
@@ -672,9 +690,12 @@ public void LegalFileNamesOnly_rejects_option_arguments_containing_invalid_file_ | |||
[Fact] | |||
public void LegalFileNamesOnly_accepts_command_arguments_containing_valid_file_name_characters() | |||
{ | |||
Argument<string[]> argument = new (); |
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.
nit
Argument<string[]> argument = new (); | |
Argument<string[]> argument = new(); |
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.
Should the ArgumentValidation.AcceptExistingOnly and OptionValidation.AcceptExistingOnly methods likewise return void?
Up to Adam's choice, but that could be addressed in a follow-up PR if required.
That is a very good question. To be honest I don't like Option<bool> flag = new ("--flag");
flag.AcceptLegalFilePathsOnly(); // it should work only with files, not things like boolean
|
Based on the feedback from @bartonjs