Skip to main content

Module source_comments

Module source_comments 

Source
Expand description

Synthesize a MarkdownDoc from source-code comments so prose-oriented rules (bloat, vague instruction, negative overload) can run against them without change.

Each extracted comment becomes one Paragraph. Byte ranges and line numbers refer to the original source file so reporters point at the real line the offending comment lives on.

Functionsยง

synthesize
Extract comments from source for language and pack them into a MarkdownDoc whose paragraphs list one comment each. Each comment is also mirrored into list_items so rules that currently scan bullets (AIL100 vague-instruction, AIL104 negative-constraint-overload) fire on source-code comments without change.