rumdl · lint and auto-fix your Markdown in seconds, then gate it in CI

4 months ago

Your Markdown drifts. Headings without blank lines around them, lines that run too long, files missing a top-level title, scattered across a whole docs folder. Nobody wants to police that by hand in review. rumdl fixes it: a fast Markdown linter and formatter, written in Rust.

Ask about this presentation

Chapters

  1. 0:00Slide 1
  2. 0:17Install it in one line
  3. 0:28Point it at your docs
  4. 0:41Fix most of them automatically
  5. 0:53And it is fast
  6. 1:06Gate it in CI
  7. 1:22Clean Markdown, kept clean
Show transcript
  1. Your Markdown drifts. Headings without blank lines around them, lines that run too long, files missing a top-level title, scattered across a whole docs folder. Nobody wants to police that by hand in review. rumdl fixes it: a fast Markdown linter and formatter, written in Rust.

    Slide text
    rumdl logo

    A high-performance Markdown linter and formatter, written in Rust.

    lint → auto-fix → gate it in CI
  2. Install it however you like. One line with pip, or Cargo, Homebrew, or npm. It is a single binary with zero dependencies, and it ships 76 lint rules, a drop-in for the classic markdownlint rule set.

    Slide text
    pip install rumdl

    Or cargo, brew, uv, or npm · a single binary, zero dependencies · 76 rules, a drop-in for markdownlint.

  3. Run it on your project. It scans every Markdown file and tells you exactly what is wrong. Which rule broke, which line, and why. Here it finds three issues across two files, each one a specific, fixable problem.

    Slide text
    $ rumdl check .
    README.md:10:1: MD022 Headings should be surrounded by blank lines
    README.md:15:81: MD013 Line length [Expected: 80; Actual: 95]
    docs/guide.md:5:1: MD041 First line in a file should be a top-level heading
    
    Found 3 issues in 2 files

    Every finding: which rule, which line, and why.

  4. Most of those 76 rules fix themselves. Add the fix flag, or run the formatter, and rumdl rewrites the files in place. Run the check again and it passes clean. No more nitpicking whitespace in code review.

    Slide text
    rumdl check --fix .   # fix the fixable violations
    rumdl fmt .           # reformat, always exits 0

    Most of the 76 rules fix themselves · then check passes clean.

  5. And it is fast. On the Rust Book, 478 Markdown files, it lints everything in just over 200 milliseconds. That is roughly ten times faster than markdownlint. Turn on caching and repeat runs finish in tens of milliseconds.

    Slide text
    Cold-start benchmark on the Rust Book, 478 Markdown files: rumdl 217 ms versus markdownlint-cli2 2.2 s and other tools

    The Rust Book, 478 files · 217 ms vs markdownlint's 2.2 s · caching drops repeat runs under 50 ms.

  6. Now make it stick. Drop the official action into a GitHub workflow, and every pull request gets linted automatically. Dirty Markdown returns a non-zero exit code, so the check goes red and the pull request fails. Set the report type to annotations, and each issue shows up inline on the changed files.

    Slide text
    # .github/workflows/lint.yml
    steps:
      - uses: actions/checkout@v4
      - uses: rvben/rumdl@v0

    Dirty Markdown exits non-zero, so the PR goes red · add report-type: annotations for inline notes.

  7. That is the loop: lint, auto-fix, and gate it in CI. It is a drop-in for markdownlint, configured with a simple config file, with an editor server and a pre-commit hook when you want them. Start at rumdl dot dev.

    Slide text
    • Lint · 76 rules, a drop-in for markdownlint.
    • Auto-fix and format · with --fix and fmt.
    • Fast · Rust, ~10x quicker, cached repeat runs.
    • Gate in CI · plus editor server and pre-commit.

    pip install rumdl  ·  rumdl.dev

What happened in AI today, in your inbox

One short email each evening. Read it and you’re caught up.

Built with ❤️ in New York