Liking cljdoc? Tell your friends :D

pebblestream.directives.check

Checks a PSOSF archive against everything Pebble Stream can verify without compiling it, and reports the results in one place, for people, pipelines and AI agents:

  1. structure and compatibility, from psosf.core (escaping, manifest, function allow-list, references outside the spreadsheet);
  2. every directive line: that it parses, names a known directive, and matches that directive's signature;
  3. the worksheet rules from the PebbleScript Reference: repetition, exclusions, requirements, header arguments, formulas in transformed columns, cycles, ignore, allowed-values.

(check-archive archive) -> Clojure data (check-entries entries) -> JSON-shaped report (string keys) (check-json text) -> the same report, as JSON text

Every finding names the worksheet, and where it applies the column and directive, with a fix when one is known.

Checks a PSOSF archive against everything Pebble Stream can verify without
compiling it, and reports the results in one place, for people, pipelines
and AI agents:

  1. structure and compatibility, from psosf.core (escaping, manifest,
     function allow-list, references outside the spreadsheet);
  2. every directive line: that it parses, names a known directive, and
     matches that directive's signature;
  3. the worksheet rules from the PebbleScript Reference: repetition,
     exclusions, requirements, header arguments, formulas in transformed
     columns, cycles, ignore, allowed-values.

(check-archive archive)  -> Clojure data
(check-entries entries)  -> JSON-shaped report (string keys)
(check-json text)        -> the same report, as JSON text

Every finding names the worksheet, and where it applies the column and
directive, with a fix when one is known.
raw docstring

check-archiveclj/s

(check-archive archive)

Every finding for a psosf.core archive that has already been classified as valid or compatible: {:errors [...] :warnings [...]}.

Every finding for a psosf.core archive that has already been classified as
valid or compatible: {:errors [...] :warnings [...]}.
sourceraw docstring

check-entriesclj/s

(check-entries entries)
(check-entries entries options)

Checks an archive given as {path text}. Returns a JSON-shaped report: {"passed" true when the archive is well-formed, breaks no rule, and has no compatibility errors other than a missing allow-list, "level" the psosf.core level: invalid, valid or compatible, "errors" structural errors, then directive and worksheet-rule errors, "warnings" [...], "compatibility-errors" why a valid archive is not compatible} Options: "allowed-functions".

Checks an archive given as {path text}. Returns a JSON-shaped report:
  {"passed"    true when the archive is well-formed, breaks no rule, and
                has no compatibility errors other than a missing allow-list,
   "level"     the psosf.core level: invalid, valid or compatible,
   "errors"    structural errors, then directive and worksheet-rule errors,
   "warnings"  [...],
   "compatibility-errors" why a valid archive is not compatible}
Options: "allowed-functions".
sourceraw docstring

check-jsonclj/s

(check-json text)

{"entries": {...}, "options": {...}} -> report, as JSON text.

{"entries": {...}, "options": {...}} -> report, as JSON text.
sourceraw docstring

formula-sheet-referencesclj/s

(formula-sheet-references formula)

The worksheets a formula refers to, by name: 'Sheet Name'!A1 or Sheet!A1. Text inside string literals is ignored.

The worksheets a formula refers to, by name: 'Sheet Name'!A1 or Sheet!A1.
Text inside string literals is ignored.
sourceraw docstring

report-textclj/s

(report-text report)
(report-text report name)

A check report as text for people: the verdict, then every error, compatibility error and warning, each with where it is, what is wrong and, where there is one, how to fix it. name, when given, labels the verdict (a file name, say).

A check report as text for people: the verdict, then every error,
compatibility error and warning, each with where it is, what is wrong and,
where there is one, how to fix it. name, when given, labels the verdict
(a file name, say).
sourceraw docstring

worksheet-modelclj/s

(worksheet-model archive)

Builds the input of schema/spreadsheet-errors from a psosf.core archive. Returns {:model {...} :errors [...] :warnings [...]} where errors and warnings come from reading the directive lines.

Builds the input of schema/spreadsheet-errors from a psosf.core archive.
Returns {:model {...} :errors [...] :warnings [...]} where errors and
warnings come from reading the directive lines.
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