concordance lint runs the same checks (note: Check) as the build pipeline on a single knowledge repository (note: Knowledge repository), before any site (note: Site) exists. In local (27 passages, no note) scope (note: Scope) it needs no network and writes nothing unless asked to fix. In global scope it reads the latest published model to check what one repository cannot see alone: links into other sources, frontmatter relations across sources and homonyms with the glossary; it never rebuilds the model (note: Model).
Steps
- Read the configuration (note: Configuration) of the source (note: Source) being linted, or the default profile (note: Profile) when none is given, and the
concordance-lint.yamlof the repository: itsexcludeglobs (21 passages, no note), its check overrides (31 passages, no note) and itsglobalblock. - List the files of the repository as the build (note: Build) would: everything but the globs
privacy.excludeandexcludename and the files git ignores (4 passages, no note), read from every.gitignorewith the rules (note: Rule) git (24 passages, no note) applies unless--no-gitignoreis given; an excluded file (note: Excluded file) is never read, counted or reported. - Parse and type (note: Type) the listed files as the build would.
- Run the checks of the registry (11 passages, no note) that apply to an isolated repository.
- In global scope, read the published model named by
global.model: from its local cache while it is younger thanglobal.max_age_hours, else fetched again with the validators the server (3 passages, no note) gave, else from the path given; when no model can be read, print one line saying why and go on with the local findings (note: Finding) alone. - In global scope, check (note: Global check) the notes (note: Note) against the remote entities (5 passages, no note): a link (note: Link) with a
source:prefix (17 passages, no note) or climbing into a sibling (3 passages, no note) source must reach a known note (E-LINK-BROKEN), or is flagged when the model was built with cross-source links (note: Cross-source link) off (W-LINK-CROSS-SOURCE); every frontmatter reference (note: Frontmatter reference) that declares a relation (note: Relation) must join a pair of types (3 passages, no note) the profile allows (E-META-REL); a title or alias (note: Alias) shared with a remote entity of another type is a homonym (note: Homonym) (I-TERM-HOMONYM). Each finding names the remote entity and the build timestamp of the model. - Print the findings, local and global (19 passages, no note) merged without repetition, as text, JSON, SARIF (8 passages, no note) or JUnit, each with the address (56 passages, no note) of its documentation (12 passages, no note) page; the JSON and SARIF reports (47 passages, no note) name the scope and say when the global scope was degraded (3 passages, no note).
- Exit with 0 when no finding reaches the blocking severity (note: Severity), 1 otherwise, 2 on an execution error (29 passages, no note); an unreachable (7 passages, no note) model is never an execution error.