forked from clj-holmes/clj-watson
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
7 changed files
with
301 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
(ns clj-watson.cli | ||
(:gen-class) | ||
(:require | ||
[cli-matic.core :as cli] | ||
[clj-watson.cli-spec :refer [CONFIGURATION]] | ||
[clj-watson.cli-spec :as cli-spec] | ||
[clj-watson.entrypoint :as entrypoint])) | ||
|
||
(defn -main [& args] | ||
(cli/run-cmd args | ||
(update-in CONFIGURATION | ||
[:commands 0] | ||
assoc :runs entrypoint/scan))) | ||
(defn -main | ||
"Entrypoint for -M cli usage" | ||
[& args] | ||
(entrypoint/do-scan (cli-spec/parse-args args))) |
Oops, something went wrong.