You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
prose_lint sentence-length Misses Sentences Wrapped Across Lines #2292
scripts/prose_lint.py --check sentence-length counts words per physical line. A sentence that a hard-wrapped Markdown file spreads over several lines is never measured whole, so it passes however long it is.
Reproduction (constructed)
Run the check on two files that hold the same 31-word sentence:
oneline.md the sentence on one line
wrapped.md the same sentence wrapped after "so that"
prose_lint.py --check sentence-length wrapped.md oneline.md reports only oneline.md:3: sentence-length: 31 words in one sentence, and nothing for wrapped.md.
Impact
Downstream repos carry hard-wrapped Markdown, such as a WORKFLOW.md wrapped at a fixed width. A change there passes the local lint and then draws a reviewer finding for the same rule. In homeassistant-purpleair, this round's WORKFLOW.md matrix bullet had a sentence over 25 words. The linter passed it, Copilot flagged it on the promotion pull request, and it took a separate fix pull request (ptr727/homeassistant-purpleair#368).
Fix
Join each paragraph's lines (and each list item's continuation lines) before splitting into sentences. Report the violation on the line where the sentence starts. comment-wrap already reasons about sentences that span comment lines, so that code may be reusable here.
Activity
Measure a Wrapped Markdown Sentence Whole in the Sentence-Length Check (