-
Notifications
You must be signed in to change notification settings - Fork 290
empty OptionList doesn't show error #68
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
Comments
Hi, thanks for reporting. You're working on development or stable branch? For the name of the method I argue the first... |
I'm working on the master branch. I've sent you a PR so you can see what I did to get the desired behavior (but I see now that ArgumentParser.cs is gutted in the dev branch so it's probably irrelevant). |
@turch, no it's not irrelevant... Often between me and contrib we use PR to show up problems. Could be my fault, in the issues there's an announcement called "Coordinate PR to development branch" that I should rename to "Coordinate PR". In this time main kernel is under heavy refactoring and I'm not able to accept PR... I'll clarify it in the informative issue. Anyway thank for using the library and for your interest in the project! :) Please accept this state of art for the moment and please take as good this reply for other issue. Thanks again, P.S.: all work done is not lost and will evaluated and eventually integrated in 2.0, along with credits. |
|
Sorry, please not take into account last post... This feature lacks in 2.0 pre-rel, it will be implemented ASAP. So I mark the issue as enhancement in respect of master branch. |
I'm experimenting on issue68 branch (derived from When targeting
Some reasoning is necessary... I want to keep the core of 2.0 as compact as possible. |
In the master branch, it seems like there is no way to explicitly say you want to parse multiple parameters, right? That knowledge is gained from a combination of So let's say, without any additional configuration would you allow this as a valid input?
If so, it may be more "clean" to do your first suggestion of splitting
I'd be inclined to say that whitespace is always the separator and if you want something custom you could apply a custom TypeConverter to the property (which will allow the user to perform any custom conversion) |
@nemec, yes you'll right. As now is impossible in 2.0...! I've started something (still not completed -> in a branche named issue68.
Thanks for comments. |
I'm about to merge issue68 -> master... I've temporary added Separator to both Option and Value, but I think that only Option should have it (so it's consistent with latest stable). I'll revert back this thing for Value attr, add few test and merge to master. cc/ @nemec @mizipzor @gimmemoore |
[Option('i', Separator=":")]
public IEnumerable<int> Integers { get; set; } This is now possible... Is the old |
I just started using this library, so forgive me if this is stupid request:
When an empty option list is parsed, shouldn't a format error be added to the PostParsingState? As I'm sure you know, It would be a one line change to add
to the block that tests whether the option is empty. (OptionGroupParser.cs L54)
e.g.
The text was updated successfully, but these errors were encountered: