Expand description
Linting of markdown embedded in Rust doc comments (/// and //!).
This module provides extraction and check-only logic for line doc comments. It is used by both the CLI and LSP to lint Rust doc comments.
Precondition: Input content must be LF-normalized (no \r\n).
The CLI path handles this via normalize_line_ending, but callers using
these functions directly must normalize first.
Not supported: Block doc comments (/** ... */) are not extracted.
Structs§
- DocComment
Block - A contiguous block of same-kind doc comments extracted from a Rust source file.
- DocComment
Line Info - Metadata for a single line in a doc comment block.
Enums§
- DocComment
Kind - The kind of doc comment: outer (
///) or inner (//!).
Constants§
- SKIPPED_
RULES - Rules that should be skipped when linting doc comment blocks.
Functions§
- check_
doc_ comment_ blocks - Check all doc comment blocks in a Rust source file and return lint warnings.
- extract_
doc_ comment_ blocks - Extract all doc comment blocks from Rust source code.