-
Notifications
You must be signed in to change notification settings - Fork 8
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
dev: explore making command line parsing easier to adapt and maintain #77
Milestone
Comments
lread
added a commit
to lread/clj-watson
that referenced
this issue
Aug 3, 2024
When running via -X or -T: - args are now validated - benefits from rich bb cli coercion support - usage help shows using keyword :arg syntax When running via -M: - preserved existing behaviour - support more coercions - usage help shows using cli -arg syntax General: - Narrower, easier to read usage help - Options relating only to dependency-check strategy are now grouped under their own heading - Some rewording/rewriting of descriptions for clarity - Command line error styled in red for visibility - Support for aligning multi-line argument descriptions - File options fail fast if file does not exist - More coercions to keywords happen at command parse time instead of within code. Code adjusted appropriately. Closes clj-holmes#77
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently
Clj-watson employs cli-matic to specify and parse its command line options.
But..
Cli-matic is good, but I think babashka.cli will likely be a better fit.
They both support specifying your command line, but babashka.cli is more of a toolbox than just a DSL and offers more flexibility:
[no-]
variant documented in usage. Something we'd like to do for Consider behaviour when no nvd api key specified #67.[ONLY APPLIED IF USING DEPENDENCY_CHECK STRATEGY]
arguments to their own section in usage helpclj-watson.properties
on classpath seems a bit odd #70 (comment)Consideration
Clj-watson explicitly supports clojure tool
-T
usage.At the very least, we need to retain any existing
-T
niceties.See #67 (comment)
Next Steps
I'll explore this idea locally, and if it all is good, follow up with a PR.
The text was updated successfully, but these errors were encountered: