pub fn build_stale_doc_report(
root: &Path,
config: StaleDocConfig,
files: Option<&[PathBuf]>,
) -> DiagnosticsReportExpand description
Build a DiagnosticsReport for the stale-doc rule.
For each documentation file matching the configured patterns, finds co-change partners
(code files it historically changes with) and flags the doc file if any partner was
committed more recently by at least min_lag_days.
Gracefully degrades if:
- The index is not built → returns empty report with a tool error note.
- The
co_change_edgestable is empty → returns empty report with a tool error note. - A file’s last commit time cannot be determined → skips the comparison.