Skip to main content

Module lint

Module lint 

Source
Expand description

Opinionated bundle health checks, beyond §11 conformance.

validate_bundle enforces only the spec’s hard requirements and reports soft guidance as warnings. lint_bundle goes further: it flags the hygiene issues a continuously-authored corpus drifts into, such as orphan concepts no link or index points at, an index.md that has fallen behind its directory, or a verification that predates the last regeneration.

Every finding is tagged with a stable rule code so CI can pin or silence individual checks. None of them is a conformance failure: a bundle with lint findings is still conformant if validate_bundle says so, which is why okf lint is a separate command rather than a stricter okf validate.

CodeSeverityFinding
L1warningmissing title
L2warningmissing description
L3warningmissing generated (and no legacy timestamp)
L4infono verified events, trust tier is unverified
L5warninglegacy v0.1 timestamp present
L6warninglegacy v0.1 body # Citations list present
L7warningbody is empty
L8warningbody has no top-level # heading
L9warninglatest verified.at predates generated.at
L10warninglinks to a status: deprecated concept
L11warningpast stale_after (with --today)
L12infostatus: draft
L13infoself-link
L14warningtitle shared with another concept
L15warningorphan: no inbound links and not listed in any index.md
L16warningan existing index.md is out of sync with its directory

Functions§

lint_bundle
Lints a loaded bundle, returning all findings.
lint_bundle_at
Lints a bundle, additionally flagging concepts that are stale on today.