Skip to main content

Module doc_comment_lint

Module doc_comment_lint 

Source
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§

DocCommentBlock
A contiguous block of same-kind doc comments extracted from a Rust source file.
DocCommentLineInfo
Metadata for a single line in a doc comment block.

Enums§

DocCommentKind
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.