pub struct LinkReport {
pub root: String,
pub concepts: usize,
pub links: usize,
pub broken: Vec<BrokenLink>,
pub non_concept: Vec<NonConceptLink>,
}Expand description
Whether an emitted bundle’s internal links resolve.
Roteiro’s own link checking (roteiro check) covers the graph and the
rendered site. Neither looks at an emitted OKF bundle, which is a third
artefact produced by a third code path — the one ADR-0021 records guessing
wrong for 43 links.
Fields§
§root: StringThe bundle root, as the caller named it.
concepts: usizeConcepts read.
links: usizeInternal concept links found across every body.
broken: Vec<BrokenLink>Targets the bundle does not contain at all — dead links, and the only
thing --check gates on.
non_concept: Vec<NonConceptLink>Targets the bundle does contain, but which are not concepts: an asset
such as a diagram or a data file, or one of the reserved index.md /
log.md. Reported, never gated — see LinkReport::is_clean.
Implementations§
Source§impl LinkReport
impl LinkReport
Sourcepub const fn is_clean(&self) -> bool
pub const fn is_clean(&self) -> bool
true when every internal link names something the bundle contains.
Not “every link resolves to a concept”, which is what this used to
mean and was the defect in issue #778. A bundle of any size links to its
own diagrams and data files; those resolve to no concept, so gating on
that made --check fail on every such bundle. On one real bundle it
reported 17 broken links of which all 17 existed on disk, and the single
genuinely dead link was indistinguishable in the output — which is the
failure worth avoiding, because a gate that cries wolf gets switched off
and takes the real dead link with it.
So a present-but-not-a-concept target is reported in
LinkReport::non_concept and does not fail the gate, which also lines
this command up with okf info (which already lists those files as
bundle contents) and okf validate (which already rates them info).
Trait Implementations§
Source§impl Clone for LinkReport
impl Clone for LinkReport
Source§fn clone(&self) -> LinkReport
fn clone(&self) -> LinkReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more