You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If num groups > max(multiplicity) (whether the args are optional or required), it's currently:
Error: expected only one match but got (--group=<name> [--opt1=<opt>])={--group=foo --opt1=1} and (--group=<name> [--opt1=<opt>])={--opt1=1}
I like that this shows you the matched groups, but (1) it always says "expected only one match", even if the minimum multiplicity > 1, and (2) it seems unnecessary to repeat the group spec.
If num groups < min(multiplicity), it's currently:
Error: Group: (--group=<name> [--opt1=<opt>]) must be specified 2 times but was matched 1 times
For consistency, I think both cases should be something like:
Error: (--group=<name> [--opt1=<opt>]) must be specified [X / at least X / at most X] time(s) but was matched 2 times: {--group=foo --opt1=1}, {--opt1=2}
This makes it clear how the groups are, well, grouped :)
If missing a required option for a group, it's currently:
Please note the previous discussion on this topic (#744) which led to a code change to address the issue. I agree that there is still room for improvement, though.
See #870.
If
num groups > max(multiplicity)
(whether the args are optional or required), it's currently:I like that this shows you the matched groups, but (1) it always says "expected only one match", even if the minimum multiplicity > 1, and (2) it seems unnecessary to repeat the group spec.
If
num groups < min(multiplicity)
, it's currently:For consistency, I think both cases should be something like:
This makes it clear how the groups are, well, grouped :)
If missing a required option for a group, it's currently:
IMO something like
This clarifies that
--group=<name>
is only needed when specifying--opt1
. This also applies for mutually dependent args:Also highly relevant to #871 -- there are some questions raised there that may shape how the errors are printed / validation is done.
The text was updated successfully, but these errors were encountered: