Skip to content Aller au contenu

Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

structure.deeply-nested-lists

What it flags

Bulleted list items nested beyond a reasonable depth. A deeply nested list forces the reader to reconstruct a complex mental hierarchy — horizontal indentation stops being a positional cue and becomes noise. Four levels of indent are too many for readers with attentional difficulties to track.

At a glance

Categorystructure
Default severitywarning
Default weight1
Languageslanguage-agnostic
Sourcesrc/rules/deeply_nested_lists.rs

Detection

Parse Markdown via pulldown-cmark; extract list items with their indentation level; flag items deeper than max_depth. Deterministic, no false positives.

Parameters

KeyTypedev-docpublicfalc
max_depthint432

Example

Under public (max depth 3):

- Level 1
  - Level 2
    - Level 3
      - Level 4    ← flagged

Diagnostic message

Includes repair guidance: flatten the structure, split into multiple lists, or promote sub-items to subsections with headings.

Suppression

See Suppressing diagnostics.

References

See References for the full bibliography.