Skip to content
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

Parser doesn't warn/throw if multiple options with same name #468

Closed
NeilMacMullen opened this issue Jul 5, 2019 · 2 comments
Closed

Parser doesn't warn/throw if multiple options with same name #468

NeilMacMullen opened this issue Jul 5, 2019 · 2 comments

Comments

@NeilMacMullen
Copy link
Contributor

For the code below, the helptext is quite happy to list both "abc" options. It would be desirable to generate a run-time warning error.

public class CommonOptions 
{
  [Option("abc")]
  public string X {get;set;}
}

public class DerivedOptions :CommonOptions
{
    [Option("abc")]
    public string Y {get;set;}
}
@moh-hassan
Copy link
Collaborator

Good idea.
PR is welcome.
Have a look to this discussion for handling repeated options.

@moh-hassan
Copy link
Collaborator

multiple options are allowed starting v2.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants