Repository navigation
Wrap human-authored Markdown at 80 columns and enforce it in CI - #238
Merged
Merged
Conversation
Wrap human-authored Markdown at 80 columns using rumdl, pinned to an exact crates.io release and installed with `cargo install --locked` into target/tools on first use. `.rumdl.toml` enables only the MD013 reflow rule and excludes CHANGELOG.md and changelog fragments, whose lines are individual entries. `cargo validate markdown` (also part of `cargo validate` and CI) fails with instructions to run `cargo fmt-markdown` when files need rewrapping. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mechanical output of `cargo fmt-markdown`, which also aligns table columns; rendered HTML is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chrsmith
force-pushed
the
chrsmith/autoformat-md-files
branch
from
October 15, 2026 20:36
b976c37 to
75a63db
Compare
CI's dtolnay/rust-toolchain pin was labeled `stable` but actually pointed at the action's `1.93.0` branch, which hardcodes rustc 1.93.0. The pinned rumdl release requires rustc 1.94 or newer, so pin CI to the `1.96.0` branch head, matching the toolchain used for local development. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tconley1428
approved these changes
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human Summary
This repository contains many important Markdown files. However, the formatting of those is inconsistent. And in some cases, notably
PRINCIPLES.md, this makes reviewing edits nearly impossible. (An entire paragraph of text is on a single "line" in the file, which trips up most diffing algorithms.)This PR adds a dependency on an automated Markdown formatter, rvben/rumdl, and wires it up to CI/CD. You will now get a build error if you try to submit changes to a Markdown file that introduces any sort of diff from (
cargo fmt-markdown).Generated Markdown files are excluded from this.
Summary
Most Markdown docs in this repo put each paragraph on one long line, which makes diffs and reviews hard to read. This PR adds a pinned Markdown formatter, enforces it in CI, and applies it to the existing docs.
Commit 1: tooling (
Add cargo validate markdown and cargo fmt-markdown)cargo fmt-markdownrewraps Markdown in place: paragraphs, lists and blockquotes are filled to 80 columns, and table columns are aligned.cargo validate markdown(also part ofcargo validate) fails when files need reformatting and prints: "Markdown formatting check failed. Runcargo fmt-markdownto rewrap the files listed above, then commit the result."::error::annotation with the same instruction.0.2.79inxtask/src/markdown.rs. On first use it is installed intotarget/tools/withcargo install --locked --version =0.2.79, so nothing comes fromPATH. crates.io releases are immutable, cargo verifies checksums, and--lockeduses rumdl's published lockfile. CI cachestarget/toolswithactions/cache, pinned by SHA..rumdl.tomlenables only line wrapping (MD013,normalizereflow mode) and table alignment (MD060). It excludesCHANGELOG.md, which release tooling generates, andchangelog/*/*.mdfragments, where each line is a separate entry. Headings, code blocks and long unbreakable inline code spans are left as they are.AGENTS.mdandCONTRIBUTING.mdnow document the new commands.Commit 2: bulk reformat (
Rewrap human-authored Markdown at 80 columns)cargo fmt-markdownacross 70 files; review commit 1 separately.Test plan
cargo validatepasses locally (Rust, Markdown, Python, TypeScript, Go, Java, .NET)cargo validate markdownexits non-zero with the message above on unformatted docsInternal tooling only, so this needs the
skip-changeloglabel.🤖 Generated with Claude Code