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

Improve validation: parsing should fail for unknown args #132

Closed
remkop opened this issue May 28, 2017 · 1 comment
Closed

Improve validation: parsing should fail for unknown args #132

remkop opened this issue May 28, 2017 · 1 comment

Comments

@remkop
Copy link
Owner

remkop commented May 28, 2017

Currently picocli is lenient: it does not fail or warn if some command line args were "left over", meaning they could not be assigned to any option or positional parameter.

Usually this should be treated as an error. "Strict" parsing mode should be the default.

If it is not difficult to preserve the current behaviour it can be made configurable through a CommandLine.setLenient(boolean) method or potentially through a system property to allow end users to tweak this for their particular use case.

@pditommaso
Copy link
Contributor

I agree on strict as default throwing and exception when an unrecognised option is entered and a CommandLine.setLenient(boolean) to disable it.

@remkop remkop modified the milestones: 0.9.7, backlog May 28, 2017
@remkop remkop changed the title Parsing should fail if args were left over Improve validation: parsing should fail for unknown args May 31, 2017
remkop added a commit that referenced this issue Jun 3, 2017
@remkop remkop closed this as completed in 07d5718 Jun 3, 2017
remkop added a commit that referenced this issue Jun 4, 2017
remkop added a commit that referenced this issue Jun 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants