Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,21 @@ change log follows the conventions of

## [Unreleased]

### Added

- An option `--output` that accepts `text` or `json`. Default is `text`.

### Changed

- Bump Jepsen version to 0.3.11.
- Bump Knossos version to 0.3.15.
- Bump Elle version to 0.2.7.
- Print unknown status without colon (#2).

### Deprecated

- An option `--verbose` is deprecated in favor of `--output json`.

### Fixed

- A `bank` checker (#82).
Expand Down
12 changes: 8 additions & 4 deletions src/elle_cli/cli.clj
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,11 @@
:parse-fn history-read-fn
:validate [identity
(str "Must be one of " (str/join ", " (sort (keys history-read-fn))))]]
["-v" "--verbose"
"(General) Enable verbose mode."]
["-v" "--output OUTPUT"
"(General) Output format. Either 'text' or 'json'. Defaults to 'text'."
:default :text
:parse-fn keyword
:validate [#{:text :json} "Must be one of text, json"]]
["-h" "--help"
"(General) Print usage."]

Expand Down Expand Up @@ -218,7 +221,8 @@
(defn -main
[& args]
(try
(let [{:keys [options arguments summary errors]} (cli/parse-opts args opts)
(let [args (mapv #(if (= "--verbose" %) "--output json" %) args)
{:keys [options arguments summary errors]} (cli/parse-opts args opts)
model-name (:model options)
read-history (:format options)
results (atom (hash-map))
Expand All @@ -244,7 +248,7 @@

(swap! results assoc filepath validness)

(if (true? (:verbose options))
(if (= :json (:output options))
(json/pprint analysis)
(println filepath "\t" validness))))

Expand Down
Loading