Liking cljdoc? Tell your friends :D

tender-creek — -o/--output flag (GitHub #2)

Phase 1 — Implementation (in progress)

Changes

  • lein-skeptic/src/leiningen/skeptic.clj:
    • Added -o/--output OUTPUT_FILE entry to cli-options.
    • Rewrote eval-in-project body: when (:output opts) is non-nil, a clojure.java.io/writer wraps *out* around the skeptic.profiling/run call, with try/finally flushing and closing before System/exit.
    • Added (require 'clojure.java.io) to init forms.
    • skeptic defn: 19 lines.

Verified so far

  • lein test in skeptic/: 305 tests, 1610 assertions, 0 failures / 0 errors.
  • clj-kondo --lint lein-skeptic/src: 0 errors, 0 warnings.

Phase 1 complete

  • Commit 210c7a4 on main.
  • lein install done for skeptic lib + plugin.
  • Five invocation variants exercised (see below); all exit 0, all behavior as specified.

Phase 2 — Docs (complete)

Changes

  • README.md: new -o/--output OUTPUT_FILE bullet in the "Running it" Options list; sentence appended in the JSONL "Combining with --profile" subsection explaining that with -o, JSONL still routes to the file and profile still routes to stderr.
  • CHANGELOG.md: entry under [Unreleased] → Added referencing GitHub #2.

End-to-end verification (Phase 1)

InvocationFile contentstdoutstderrexit
-o FILE"No inconsistencies found"empty of skeptic output0
-p -o FILEpure JSONL, final line run-summaryempty0
--profile -o FILEfindings + profile summaryempty0
-p --profile -o FILEpure JSONL (0 non-json lines)emptyprofile summary0
(no -o)"No inconsistencies found"0

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close