Liking cljdoc? Tell your friends :D

hive-addon.tool-contract.check

CI entry point for the root-tool contract.

clojure -M:test -m hive-addon.tool-contract.check [--require-descriptions] my.addon/->addon [more/ctor ...]

Each argument names a zero-arg fn returning an IAddon. Its tools are checked; violations print and the process exits 1, warnings print and do not fail. --require-descriptions turns an undescribed property into a violation. Exit 2 when an argument cannot be resolved or called.

--manifests also checks every ctor named by the repo's OWN resources/META-INF/hive-addons/*.edn whose :addon/capabilities has :tools, called as the mounter calls it, with one config map. One CI line, no per-repo ctor list; exit 2 if no such manifest exists.

CI entry point for the root-tool contract.

  clojure -M:test -m hive-addon.tool-contract.check [--require-descriptions] my.addon/->addon [more/ctor ...]

Each argument names a zero-arg fn returning an IAddon. Its `tools` are
checked; violations print and the process exits 1, warnings print and do
not fail. `--require-descriptions` turns an undescribed property into a
violation. Exit 2 when an argument cannot be resolved or called.

`--manifests` also checks every ctor named by the repo's OWN
resources/META-INF/hive-addons/*.edn whose :addon/capabilities has :tools,
called as the mounter calls it, with one config map. One CI line, no
per-repo ctor list; exit 2 if no such manifest exists.
raw docstring

-mainclj

(-main & args)
source

addon-toolsclj

(addon-tools ctor-sym)
(addon-tools ctor-sym args)

Resolve ctor-sym, call it with args (default none), and return {:ctor sym :tools [...]} or {:ctor sym :error msg}. Manifest ctors take the mounter's one config argument, so --manifests passes [{}].

Resolve `ctor-sym`, call it with `args` (default none), and return
{:ctor sym :tools [...]} or {:ctor sym :error msg}. Manifest ctors take the
mounter's one config argument, so `--manifests` passes [{}].
sourceraw docstring

manifest-ctorsclj

(manifest-ctors manifests)

Pure: mount-manifest maps -> sorted, distinct ctor strings ("init-ns/init-fn") of every manifest whose :addon/capabilities has :tools.

Pure: mount-manifest maps -> sorted, distinct ctor strings
("init-ns/init-fn") of every manifest whose :addon/capabilities has :tools.
sourceraw docstring

manifest-dirclj

Where a repo keeps its OWN mount manifests. Read from the working tree, not the classpath: the classpath also carries every dependency's manifests.

Where a repo keeps its OWN mount manifests. Read from the working tree, not
the classpath: the classpath also carries every dependency's manifests.
sourceraw docstring

parse-argsclj

(parse-args args)

Split CLI args into {:opts {...} :ctors [sym-str ...] :unknown [flag ...]}.

Split CLI args into {:opts {...} :ctors [sym-str ...] :unknown [flag ...]}.
sourceraw docstring

read-manifestsclj

(read-manifests)
(read-manifests dir)

Read every *.edn under dir (default manifest-dir). Returns {:manifests [map ...] :errors [str ...]}; a missing dir yields neither.

Read every *.edn under `dir` (default `manifest-dir`). Returns
{:manifests [map ...] :errors [str ...]}; a missing dir yields neither.
sourceraw docstring

verdictclj

(verdict results)
(verdict results opts)

Pure: per-ctor results -> {:exit n :lines [str]}. opts is passed to contract/report (e.g. {:require-descriptions? true}).

Pure: per-ctor results -> {:exit n :lines [str]}. `opts` is passed to
`contract/report` (e.g. {:require-descriptions? true}).
sourceraw docstring

with-manifest-ctorsclj

(with-manifest-ctors parsed)
(with-manifest-ctors {:keys [opts ctors]} read-fn)

Plan the run: explicit ctors are called with no args, manifest ctors (under {:manifests? true}) with the mounter's config arg {}. Returns {:calls [[ctor-str args] ...]} or {:exit 2 :lines [...]}: an unreadable manifest, or a --manifests run that ends with nothing to check, is exit 2 (a gate that silently checks nothing is worse than a red one).

Plan the run: explicit ctors are called with no args, manifest ctors (under
{:manifests? true}) with the mounter's config arg `{}`. Returns
{:calls [[ctor-str args] ...]} or {:exit 2 :lines [...]}: an unreadable
manifest, or a --manifests run that ends with nothing to check, is exit 2
(a gate that silently checks nothing is worse than a red one).
sourceraw docstring

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