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

Make "allow option overwriting" configurable #129

Closed
remkop opened this issue May 24, 2017 · 3 comments
Closed

Make "allow option overwriting" configurable #129

remkop opened this issue May 24, 2017 · 3 comments

Comments

@remkop
Copy link
Owner

remkop commented May 24, 2017

Currently picocli accepts multiple occurrences of options with arity=1 and uses the last value.
It may be desirable to throw a SuperfluousParameterException instead.

@ddimtirov suggested making validation behaviour configurable:

  1. accept and silently use last value
  2. accept and emit warning while using last value
  3. reject (throw exception)
@remkop remkop added this to the backlog milestone May 24, 2017
@ddimtirov
Copy link

ddimtirov commented May 25, 2017 via email

@remkop remkop changed the title Add validation for multiple occurrences of options with arity=1 Make "allow option overwriting" configurable May 31, 2017
@remkop
Copy link
Owner Author

remkop commented Jun 4, 2017

#138 has been implemented, with an option to switch the validation off (the last specified value is used in that case). What hasn't been done yet is providing an option to emit warnings

@remkop
Copy link
Owner Author

remkop commented Aug 4, 2017

Created #158 for the remaining work. Closing this ticket.

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