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

added functionality to ignore undefined options #163

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

daanvdn
Copy link

@daanvdn daanvdn commented Oct 12, 2018

hi @kohsuke, I added a small bit of functionality to CmdLineParser that allows to ignore undefined options, rather than throwing a CmdLineException. This behaviour can be controlled through the boolean switch org.kohsuke.args4j.ParserProperties#ignoreUndefinedOptions. This is switched off by default. Currently it only works for fields annotated with @Option and not with @Argument fields.
I added two unit tests.
If you would take this pull request into consideration, I'd be very grateful. Please let me know if any changes are required.

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

Successfully merging this pull request may close these issues.

1 participant