-
Notifications
You must be signed in to change notification settings - Fork 78
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
JHOVE doesn't handle chained command line flags properly #412
Comments
|
If you haven't already settled on something else, I really like JCommander for CLI options. |
|
JCommander seems indeed a well-supported library to do that. It has no extra-dependencies, is Apache 2-0 license, requires Java 8. Another library that appears when searching is picocli: no extra-dependencies, Apache 2.0 license, works with Java 5. The comparison , made by the author itself, insists in the fact that it can be integrated as source (no dependency at all) and it Supports for clustered POSIX short options, which is what this issue is about... |
|
Oops, you're right! I thought JCommander supported clustered options, but I haven't checked in a while (seems it does not). Indeed picocli looks nice, and it even supports autocomplete. |
|
@carlwilson yes, I am. That would be great. I'm looking forward to start with making myself familiar with picoli. |
|
That's great @DinoAGW, I'll likely not start until tomorrow but will get a few tests written. There's some implied refactoring here as the code's not testable in its current state. It'll need a dedicated parsing class that returns some kind of config instance, at least in my head. I might need to do that as I write the tests. |
|
here is a first allmost complete try to solve it. |
JHOVE uses custom code for parsing command line parameters that doesn't support chaining flags. For example intuitively
jhove -krshould enable checksumming and the use of raw data flags but this only happens ifjhove -k -ris used.The text was updated successfully, but these errors were encountered: