rumdl Rules Reference

June 25, 2026 · View on GitHub

A comprehensive reference of all Markdown linting rules

Introduction

rumdl implements 76 rules for checking Markdown files. This document provides a comprehensive reference of all available rules, organized by category. Each rule has a brief description and a link to its detailed documentation.

For information on global configuration settings (file selection, rule enablement, etc.), see the Global Settings Reference.

For flavor-specific behavior (MkDocs, MDX, Quarto), see the Markdown Flavors Reference.

Rule Categories

Opt-in Rules

The following rules are disabled by default because they enforce opinionated style choices that may not suit all projects. Enable them explicitly if your project requires these checks.

RuleDescriptionWhy opt-in
MD060Table formattingMakes significant formatting changes to existing tables
MD063Heading capitalizationStyle varies by guide (AP, Chicago, APA)
MD070Nested code fenceAuto-fix modifies document structure, false positives on docs
MD072Frontmatter key sortMany projects prefer semantic ordering over alphabetical
MD073TOC validationRequires specific TOC markers in document
MD074MkDocs nav validationRequires flavor = "mkdocs" to activate
MD080Heading anchor collisionCollisions are functional under platform auto-suffixing
MD082No empty sectionsEmpty sections are sometimes intentional stubs

Enabling Opt-in Rules

Use extend-enable in the [global] section to enable opt-in rules:

.rumdl.toml:

[global]
extend-enable = ["MD060", "MD063", "MD072"]

# Configure enabled rules as needed
[MD060]
style = "aligned"

[MD063]
style = "title-case"

pyproject.toml:

[tool.rumdl]
extend-enable = ["MD060", "MD063", "MD072"]

[tool.rumdl.MD060]
style = "aligned"

[tool.rumdl.MD063]
style = "title-case"

See each rule's documentation for available configuration options.

Note on Missing Rule Numbers

Some rule numbers are not implemented in rumdl:

  • MD002 - Deprecated and removed from markdownlint v0.13.0 (replaced by MD041); removed from rumdl for compatibility
  • MD006 - Not implemented in DavidAnson/markdownlint (JavaScript version); removed from rumdl for compatibility
  • MD008 - Originally intended for "Unordered list spacing" but not implemented in modern markdownlint
  • MD015, MD016, MD017 - These rule numbers were never assigned in either the Ruby or Node.js versions of markdownlint

These gaps in numbering are maintained for compatibility with markdownlint rule numbering.

Severity Levels

Rules are categorized into three severity levels based on their impact on document functionality:

Error Severity

Rules with Error severity flag issues that break document functionality:

  • MD001 - Broken heading hierarchy prevents screen reader navigation
  • MD011 - Reversed link syntax makes links non-functional
  • MD024 - Duplicate headings create ID collisions, anchors point to wrong sections
  • MD025 - Multiple H1 elements break document outline structure
  • MD042 - Empty links have no destination and don't work
  • MD045 - Missing alt text violates WCAG accessibility requirements
  • MD051 - Invalid link fragments point to non-existent sections
  • MD057 - Links to non-existent files are broken
  • MD066 - Undefined footnote references are broken
  • MD068 - Empty footnote definitions have no content

Warning Severity

Most rules use Warning severity by default. These flag style, formatting, and convention issues that don't break document functionality but affect readability, consistency, or best practices.

Info Severity

Info severity is available for rules you want to track but not treat as warnings. Useful for:

  • Style issues that automatic formatting will fix
  • Low-priority suggestions
  • Rules you're gradually adopting

Configuring Severity

You can override default severities for any rule in your configuration file:

.rumdl.toml:

[MD013]
severity = "info"     # Downgrade to info (formatting will fix this)

[MD004]
severity = "error"    # Upgrade from warning to error

pyproject.toml:

[tool.rumdl.MD013]
severity = "info"

[tool.rumdl.MD004]
severity = "error"

Valid severity values: "error", "warning", "info" (case-insensitive)

Severity affects:

  • Exit codes: Use --fail-on to control which severities cause exit code 1
  • Output formatting: Different severities are visually distinct in console output
  • LSP: Error → Error, Warning → Warning, Info → Information in your editor
  • CI/CD: severity controls whether linting failures block builds

Heading Rules

Rule IDRule NameDescription
MD001Heading incrementHeadings should only increment by one level at a time
MD003Heading styleHeading style should be consistent
MD018No space atxNo space after hash on atx style heading
MD019Multiple space atxMultiple spaces after hash on atx style heading
MD020No space closed atxNo space inside hashes on closed atx style heading
MD021Multiple space closed atxMultiple spaces inside hashes on closed atx style heading
MD022Blanks around headingsHeadings should be surrounded by blank lines
MD023Heading start leftHeadings must start at the beginning of the line
MD024Multiple headingsMultiple headings with the same content
MD025Single titleMultiple top-level headings in the same document
MD036No emphasis as headingEmphasis used instead of a heading
MD041First line h1First line in a file should be a top-level heading
MD043Required headingsRequired heading structure
MD063Heading capitalizationHeading text capitalization style
MD080Heading anchor collisionHeading anchors (slugs) must be unique
MD082No empty sectionsHeadings must have content before the next heading

List Rules

Rule IDRule NameDescription
MD004UL styleUnordered list style
MD005List indentInconsistent indentation for list items at the same level
MD007UL indentUnordered list indentation
MD029OL prefixOrdered list item prefix
MD030List marker spaceSpaces after list markers
MD032Blanks around listsLists should be surrounded by blank lines
MD069No duplicate list markersDuplicate markers like - - text from copy-paste
MD076List item spacingList item spacing should be consistent
MD077List continuation indentList continuation content indentation

Whitespace Rules

Rule IDRule NameDescription
MD009No trailing spacesNo trailing spaces
MD010No hard tabsNo hard tabs
MD012No multiple blanksNo multiple consecutive blank lines
MD013Line lengthLine length
MD027Multiple spaces blockquoteMultiple spaces after blockquote symbol
MD028Blanks blockquoteBlank line inside blockquote
MD031Blanks around fencesFenced code blocks should be surrounded by blank lines
MD047File end newlineFiles should end with a single newline character
MD064No multiple consecutive spacesMultiple consecutive spaces in content
MD065Blanks around HRHorizontal rules should be surrounded by blank lines

Formatting Rules

Rule IDRule NameDescription
MD026No trailing punctuationTrailing punctuation in heading
MD033No inline HTMLInline HTML
MD035HR styleHorizontal rule style
MD037Spaces around emphasisSpaces inside emphasis markers
MD038No space in codeSpaces inside code span elements
MD039No space in linksSpaces inside link text
MD044Proper namesProper names should have consistent capitalization
MD049Emphasis styleEmphasis style should be consistent
MD050Strong styleStrong style should be consistent
MD081No excessive emphasisExcessive bold/italic emphasis in prose

Code Block Rules

Rule IDRule NameDescription
MD014Commands show outputCode blocks should show output when appropriate
MD040Fenced code languageFenced code blocks should have a language specified
MD046Code block styleCode block style
MD048Code fence styleCode fence style
MD078Missing chunk labelsExecutable Quarto chunks should have a label
MD079Chunk label spacesQuarto chunk labels must not contain whitespace
Rule IDRule NameDescription
MD011Reversed linkReversed link syntax
MD034No bare URLsBare URL used
MD042No empty linksNo empty links
MD045No alt textImages should have alternate text
MD051Link fragmentsLink fragments should be valid heading IDs
MD052Reference links imagesReferences should be defined
MD053Link image definitionsLink and image reference definitions should be needed
MD054Link image styleLink and image style
MD059Link textLink text should be descriptive

Table Rules

Rule IDRule NameDescription
MD055Table pipe styleTable pipe style should be consistent
MD056Table column countTable column count should be consistent
MD058Table spacingTables should be surrounded by blank lines
MD075Orphaned table rowsOrphaned table rows or headerless pipe content

Footnote Rules

Rule IDRule NameDescription
MD066Footnote validationFootnote references should have definitions and vice versa
MD067Footnote definition orderFootnote definitions should appear in order of reference
MD068Empty footnote definitionsFootnote definitions should not be empty

Frontmatter Rules

Rule IDRule NameDescription
MD071Blank line after frontmatterFrontmatter should be followed by a blank line
MD072Frontmatter key sortFrontmatter keys should be sorted (YAML/TOML/JSON)

Other Rules

Rule IDRule NameDescription
MD057Relative linksRelative links should exist
MD060Table formatTable formatting should be consistent
MD061Forbidden termsCertain terms should not be used
MD062Link destination spaceNo whitespace in link destinations
MD073TOC validationTable of Contents should match headings
MD074MkDocs nav validationNav entries should point to existing files

Using Rules

Rules can be enabled, disabled, or configured in your rumdl configuration file:

# Global configuration options
[global]
# List of rules to disable
disable = ["MD013", "MD033"]

# Rule-specific configurations
[MD003]
style = "atx"  # Heading style (atx, atx-closed, setext)

[MD004]
style = "consistent"  # List style (asterisk, plus, dash, consistent)

For more information on configuring rumdl, see the Configuration section.

Rule Severities

Each rule has a default severity level:

  • error: Critical issues (broken links, accessibility violations)
  • warning: Style and convention issues (default for most rules)
  • info: Low-priority suggestions or issues that formatting will fix

You can customize rule severities in your configuration file:

[MD013]
severity = "info"  # Downgrade to info (formatting will fix this)

Use --fail-on to control which severities cause exit code 1:

  • --fail-on any (default): Exit 1 on any violation
  • --fail-on warning: Exit 1 on warning or error only
  • --fail-on error: Exit 1 only on errors
  • --fail-on never: Always exit 0

Configuration

You can configure rumdl using a TOML configuration file. Create a default configuration file using:

rumdl init

This generates a .rumdl.toml file with default settings that you can customize.