Skip to main content

Module workspace_index

Module workspace_index 

Source
Expand description

Workspace-wide index for cross-file analysis

This module provides infrastructure for rules that need to validate references across multiple files, such as MD051 which validates that cross-file link fragments point to valid headings.

The index is built in parallel and designed for minimal memory overhead.

§Cache Format

The workspace index can be persisted to disk for faster startup on repeated runs. The cache format includes a version header to detect incompatible format changes:

[4 bytes: magic "RWSI" - Rumdl Workspace Index]
[4 bytes: format version (u32 little-endian)]
[N bytes: postcard-serialized WorkspaceIndex]

Structs§

CrossFileLinkIndex
Information about a cross-file link for validation
ExtractedCrossFileLinks
Markdown file links extracted from a document, split by how they resolve.
FileIndex
Index data extracted from a single file
HeadingIndex
Information about a heading for cross-file lookup
ReferenceLinkIndex
Information about a reference link for cross-file analysis
VulnerableAnchor
Information about a vulnerable anchor (heading without custom ID)
WorkspaceIndex
Workspace-wide index for cross-file analysis

Functions§

extract_cross_file_links
Extract cross-file links from content using correct regex-based position tracking.