versions.formatFindingfunctionno test imports itfunction formatFinding(f: VersionsFinding): stringA finding as one line: file: rule: message.
The findings of the versions tool (commons 0026-works-versioning FR-007, FR-013, FR-020, FR-022, FR-027, FR-028): the rule each belongs to and the shape every one has.
Pure data. A finding names the file it is about (a record, or refs/tags/<tag> for a tag), the rule, a sentence, and the work. The rules that read only a folder (a record that does not decode, a version that does not match its scheme, a controlled document with no approval) are those of the rule plugin (plugin.ts); the others need Git and are the command's.
import { VERSIONS_RULES } from "./rules.ts";
VERSIONS_RULES.includes("versions/not-grown"); // trueversions.formatFindingfunctionno test imports itfunction formatFinding(f: VersionsFinding): stringA finding as one line: file: rule: message.
versions.sortFindingsfunctionno test imports itfunction sortFindings(findings: readonly VersionsFinding[]): readonly VersionsFinding[]Findings in a stable order: by file, then rule, then message.
versions.VERSIONS_RULESconstno test imports itconst VERSIONS_RULES: readonly VersionsRule[]Every rule, in the order a report lists them.
versions.VersionsFindingtypeno test imports ittype VersionsFinding = {
readonly rule: VersionsRule;
readonly file: string;
readonly work: string;
readonly message: string;
};A finding: the rule, the file (or tag) it is about, the work's slug where it is known and a sentence.
versions.VersionsRuletypeno test imports ittype VersionsRule =
| "versions/record-invalid"
| "versions/scheme-mismatch"
| "versions/approval-missing"
| "versions/identity-changed"
| "versions/not-grown"
| "versions/ledger-order"
| "versions/tag-moved"
| "versions/tag-removed"
| "versions/retention-early";The ids of the rules of the tool.
formatFindingfunctionno test imports itfunction formatFinding(f: VersionsFinding): stringA finding as one line: file: rule: message.
sortFindingsfunctionno test imports itfunction sortFindings(findings: readonly VersionsFinding[]): readonly VersionsFinding[]Findings in a stable order: by file, then rule, then message.
VERSIONS_RULESconstconst VERSIONS_RULES: readonly VersionsRule[]Every rule, in the order a report lists them.
VersionsFindingtypeno test imports ittype VersionsFinding = {
readonly rule: VersionsRule;
readonly file: string;
readonly work: string;
readonly message: string;
};A finding: the rule, the file (or tag) it is about, the work's slug where it is known and a sentence.
VersionsRuletypeno test imports ittype VersionsRule =
| "versions/record-invalid"
| "versions/scheme-mismatch"
| "versions/approval-missing"
| "versions/identity-changed"
| "versions/not-grown"
| "versions/ledger-order"
| "versions/tag-moved"
| "versions/tag-removed"
| "versions/retention-early";The ids of the rules of the tool.