rvesse / airline

Java annotation-based framework for parsing Git like command line structures with deep extensibility
https://rvesse.github.io/airline/
Apache License 2.0
128 stars 20 forks source link

@RequireSome produces duplicate errors #94

Closed rvesse closed 5 years ago

rvesse commented 5 years ago

When using @RequireSome over a number of options if the user specifies none of those options they can potentially get duplicate error messages depending on the error handler used.

For example if using CollectAll as the error handler it would get N duplicate error messages where N is the number of options in the @RequireSome group.

To address this it would be nice if CollectAll checked the collected errors for duplicate messages and suppressed duplicates. Duplicates could be gathered on the original error by adding them to the suppressed exceptions.