All rules

Empty section

empty-sectionon by defaultJapanese / English

A heading with nothing under it before the next heading at its level or higher

Example

Flagged
# Setup guide ## Before you start ## Steps Fit the parts.
What chaff prints
3:1 Nothing under the heading "Before you start"
Fixed
# Setup guide ## Before you start Gather the tools. ## Steps Fit the parts.
What chaff prints
no finding

How to fix

Write the section, or remove the heading.

Why it matters

A heading followed straight away by a heading of the same or a higher level has nothing under it. A heading was put up to be filled in later, or its content was deleted and the heading left behind. It still shows in the table of contents, and a reader who opens it finds nothing. A heading followed by a deeper one (a section split into subsections) has content and is not reported. The last heading of the document is reported if nothing follows it. A section holding only an HTML comment counts as empty.

What it does not flag

A heading followed by a deeper heading (a section split into subsections) is not reported. It runs on Markdown only.

Turning it off or relaxing it

Silence this one spot (in the document)
<!-- stet: empty-section — reason -->
Relax it for the team (the reason is kept as a comment in chaff.yaml)
npx chaffjs relax empty-section --why "reason"
Turn it off for the team (chaff.yaml)
rules: empty-section: off
Technical details
Layer
L1
Status
stable
Severity
warning
Languages
Japanese and English
Suited to
business, technical, blog, legal, docs, academic, literature, speech
Reads from the document
markdown

Levels

Set a level for this rule under rules in chaff.yaml. With nothing set, it runs at the level its genre gives it (see By genre below).

stricterror
normalwarning
relaxedinfo

This rule has no limit to count to. A level sets how a finding is marked: relaxed keeps the finding and marks it a step lower.

By genre

Runs by default in
technical/spec, technical/readme, blog/tech, blog/essay, blog/owned-media, business/proposal, business/report, business/email, business/press-release, business/meeting-notes, legal/contract, legal/statute, legal/judgment, legal/patent, docs/manual, docs/faq, docs/glossary, academic/paper, literature/fiction, literature/essay, literature/poetry, literature/play, speech/address, speech/transcript

Genres

Message

Nothing under the heading "{heading}"

This page is built from the rule's definition file:packages/chaff/rules/empty-section.yaml