IF Commons GitHub

logical/check

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0003-repoctl-sync FR-007

repoctl check (commons repoctl 0003-repoctl-sync FR-007, FR-008): every check of the repository in one report. A section is one check (a generator's, the specification kit of commons, the rules of Mizan, the versions, the specification kit of each library, the constants that say a version) with its findings, each a code of the closed union that repoctl explain explains and the command that fixes it. Nothing is written.

import { sectionOk } from "./check.ts";
sectionOk({ id: "specs", title: "The specification kit of commons", findings: [] }); // true

Source: commons/repoctl/src/logical/check.ts

3 of 12 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

logical.Sectiontypeno test imports it
type Section = { readonly id: string; readonly title: string; readonly findings: readonly Finding[] };

One check and what it found.

logical.CheckReporttypeno test imports it
type CheckReport = { readonly sections: readonly Section[] };

Every section, in the order they are reported.

logical.sectionOkfunctionno test imports it
function sectionOk(s: Section): boolean

Whether a section found nothing that fails.

logical.reportOkfunctionno test imports it
function reportOk(r: CheckReport): boolean

Whether a whole report found nothing that fails.

logical.findingsOfProgramfunctionno test imports it
function findingsOfProgram(run: Run, code: ProblemCode, fix: string): readonly Finding[]

What a check program's end is as findings: none where it ended with 0, one for each line it said where it ended with 1, and a warning that it did not run for any other status.

logical.runCheckfunctionno test imports it
function runCheck(w: World, config: Pick<Config, "checks" | "generators" | "libraries">): Promise<CheckReport>

Runs every check of the configuration: the generators', its named checks, and, where it has libraries, the specification kit of each and the constants that say a version.

Sectiontypeno test imports it
type Section = { readonly id: string; readonly title: string; readonly findings: readonly Finding[] };

One check and what it found.

CheckReporttypeno test imports it
type CheckReport = { readonly sections: readonly Section[] };

Every section, in the order they are reported.

sectionOkfunction
function sectionOk(s: Section): boolean

Whether a section found nothing that fails.

Imported by 4 tests of the run (4 passed, 0 failed): the library's results

reportOkfunction
function reportOk(r: CheckReport): boolean

Whether a whole report found nothing that fails.

Imported by 4 tests of the run (4 passed, 0 failed): the library's results

findingsOfProgramfunction
function findingsOfProgram(run: Run, code: ProblemCode, fix: string): readonly Finding[]

What a check program's end is as findings: none where it ended with 0, one for each line it said where it ended with 1, and a warning that it did not run for any other status.

Imported by 4 tests of the run (4 passed, 0 failed): the library's results

runCheckfunctionno test imports it
function runCheck(w: World, config: Pick<Config, "checks" | "generators" | "libraries">): Promise<CheckReport>

Runs every check of the configuration: the generators', its named checks, and, where it has libraries, the specification kit of each and the constants that say a version.

Titles, headings, exports, tables, columns and requirements. Esc closes.