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:
(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.(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 [...]}.(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".(check-json text){"entries": {...}, "options": {...}} -> report, as JSON text.
{"entries": {...}, "options": {...}} -> report, as JSON text.
(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.
(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).
(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.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |