Skip to main content

Module lint

Module lint 

Source
Expand description

Opinionated bundle health checks, beyond conformance and validation.

validate_bundle enforces the spec’s hard conformance requirements and reports material deviations, data integrity problems, broken links, temporal inconsistencies, and contract issues as validation warnings. lint_bundle goes further into opinionated authoring hygiene, markdown prose layout, code-block syntax tagging, and whitespace formatting.

Every finding is tagged with a stable rule code (L1..L12) 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
L1warningbody has no top-level # heading
L2infofrontmatter keys not in canonical preferred order
L3warningheading hierarchy drift (heading levels skipped or multiple #)
L4warningempty / stub section heading with no content
L5infosource declared in frontmatter but never cited with footnote
L6infonon-standard actor identity in generated, verified, or author
L7warning# Computation code block missing language tag
L8infotrailing whitespace or excess blank lines in markdown body
L9warningorphan: no inbound links and not listed in any index.md
L10infoself-link (concept links to itself)
L11infono verified events, trust tier is unverified
L12infostatus: draft

Functions§

lint_bundle
Lints a loaded bundle, returning all findings.
lint_bundle_at
Lints a bundle, returning all opinionated formatting and style findings.