Skip to content

ci: enforce consistent markdown formatting with rumdl#511

Open
sandr01d wants to merge 1 commit intowfxr:mainfrom
sandr01d:rumdl
Open

ci: enforce consistent markdown formatting with rumdl#511
sandr01d wants to merge 1 commit intowfxr:mainfrom
sandr01d:rumdl

Conversation

@sandr01d
Copy link
Copy Markdown
Collaborator

@sandr01d sandr01d commented Apr 8, 2026

Check list

  • I have performed a self-review of my code
  • I have commented my code in hard-to-understand areas
  • I have added unit tests for my code
  • I have made corresponding changes to the documentation

Description

Enforce a consisten markdown style using rumdl. This includes:

  • A GitHub Action
  • A pre-commit hook
  • Consistently formatted markdown files :)

As a side node, I'm working on something similar for our shell scripts. Just have to wait for the next version of shfmt to bring some fixes we need.

Type of change

  • Bug fix
  • New feature
  • Refactor
  • Breaking change
  • Test
  • Documentation change
  • CI

Test environment

  • Shell
    • bash
    • zsh
    • fish
  • OS
    • Linux
    • Mac OS X
    • Windows
    • Others:

Summary by CodeRabbit

  • Chores

    • Added CI validation for rumdl and a pre-commit rumdl formatter hook.
    • Introduced a rumdl configuration to enforce markdown linting rules and ignore patterns.
  • Documentation

    • Reformatted README, CONTRIBUTING, and AGENTS with underline-style headings and adjusted wrapping.
    • Added a local "rumdl check" command entry to development/contribution guidance.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 8, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds rumdl markdown linting: a new GitHub Actions job rumdl-check using rvben/rumdl@v0.1.68, a pre-commit hook rumdl-fmt via rvben/rumdl-pre-commit@v0.1.68, a .rumdl.toml config, and formatting edits in docs to conform to the lint rules.

Changes

Cohort / File(s) Summary
CI & Lint Integration
.github/workflows/ci.yaml
Adds rumdl-check job that checks out the repo and runs rvben/rumdl@v0.1.68. Existing build and commitlint jobs unchanged.
Pre-commit Hook
.pre-commit-config.yaml
Adds https://github.com/rvben/rumdl-pre-commit pinned to rev: v0.1.68 and registers hook id: rumdl-fmt.
Linter Configuration
.rumdl.toml
New rumdl config: excludes .git and .github, enables respect-gitignore, disables MD033, sets MD003 to setext, and enforces MD013 max line length 120.
Documentation Formatting
AGENTS.md, CONTRIBUTING.md, README.md
Converted ATX headings to Setext/underlined style, rewrapped paragraphs, adjusted blank lines and minor markup to align with lint rules.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant Local as Local Repo
    participant PreCommit as Pre-commit
    participant CI as GitHub Actions
    participant Rumdl as rvben/rumdl

    Dev->>Local: edit files & run git commit
    Local->>PreCommit: run `rumdl-fmt` hook
    PreCommit->>Local: pass or report issues
    Dev->>CI: push / open PR
    CI->>Rumdl: run `rumdl-check` job (`rvben/rumdl@v0.1.68`)
    Rumdl->>CI: lint results (pass/fail)
    CI->>Dev: report status
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested reviewers

  • wfxr
  • cjappl

Poem

🐇 I hopped through headings, tidy and fleet,
Lines wrapped snugly, each paragraph neat.
A pre-commit nudge and CI's bright beam,
Linted and lovely — I twitch and dream. ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately summarizes the main change: introducing rumdl for consistent markdown formatting in CI.
Description check ✅ Passed The PR description covers the key aspects of the change with a clear summary, includes appropriate checklist items, and specifies the change type as CI.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
CONTRIBUTING.md (1)

48-54: ⚠️ Potential issue | 🟠 Major

Document rumdl/pre-commit in contributor validation steps.

The PR adds a required markdown check in CI plus a pre-commit hook, but these sections still omit the dependency and a local command to run it. Please add pre-commit (or explicit rumdl) under dependencies and include a local validation step such as pre-commit run --all-files.

📝 Suggested doc update
 To run the same checks as CI, make sure these tools are available locally:
 
 - `bash`, `zsh`, and `fish`
 - `shellcheck`
 - `curl`
 - `bashunit` as `lib/bashunit`
+- `pre-commit` (includes `rumdl-fmt` from `.pre-commit-config.yaml`)
@@
 shellcheck forgit.plugin.sh bin/git-forgit
+pre-commit run --all-files
 lib/bashunit .
 bash forgit.plugin.sh
 zsh forgit.plugin.zsh
 fish conf.d/forgit.plugin.fish

As per coding guidelines: Update docs (README.md and CONTRIBUTING.md) for user-visible changes.

Also applies to: 66-72

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CONTRIBUTING.md` around lines 48 - 54, Update CONTRIBUTING.md (and README.md
where applicable) to list the pre-commit dependency (explicitly mention
rumdl/pre-commit or pre-commit) in the local prerequisites and add a local
validation command example such as "pre-commit run --all-files" (or the
equivalent rumdl command) to the section that currently lists
shellcheck/curl/bashunit so contributors can run the same markdown/pre-commit
checks locally.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.pre-commit-config.yaml:
- Around line 23-24: Update the pinned revision for the rumdl pre-commit hook in
.pre-commit-config.yaml: change the rev value currently set to v0.1.62 to match
CI by using v0.1.68 so local pre-commit runs use the same rumdl version as CI
(update the rev field under the repo entry for
https://github.com/rvben/rumdl-pre-commit).

In @.rumdl.toml:
- Line 23: The MD003 failure is caused by forcing setext headings via the style
= "setext" setting; change that setting to allow mixed heading levels by
replacing style = "setext" with style = "consistent" (or remove the explicit
style entry) in .rumdl.toml so the linter won't force only setext headings and
will accept the README's ATX H3/H4 headings.

---

Outside diff comments:
In `@CONTRIBUTING.md`:
- Around line 48-54: Update CONTRIBUTING.md (and README.md where applicable) to
list the pre-commit dependency (explicitly mention rumdl/pre-commit or
pre-commit) in the local prerequisites and add a local validation command
example such as "pre-commit run --all-files" (or the equivalent rumdl command)
to the section that currently lists shellcheck/curl/bashunit so contributors can
run the same markdown/pre-commit checks locally.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 98a0b302-08f4-4f6d-8119-b923de7c8db4

📥 Commits

Reviewing files that changed from the base of the PR and between 17110bf and 60660ce.

📒 Files selected for processing (6)
  • .github/workflows/ci.yaml
  • .pre-commit-config.yaml
  • .rumdl.toml
  • AGENTS.md
  • CONTRIBUTING.md
  • README.md

Copy link
Copy Markdown
Collaborator

@carlfriedrich carlfriedrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great addition, thanks @sandr01d

@sandr01d sandr01d force-pushed the rumdl branch 2 times, most recently from 54a7749 to 934d41c Compare April 9, 2026 18:39
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CONTRIBUTING.md`:
- Line 72: The CONTRIBUTING.md file references running "rumdl check ." but the
Development Dependencies section doesn't list rumdl; update that section to
include rumdl as a required development dependency (mentioning a recommended
install command or version), e.g., add an entry named "rumdl" to the Development
Dependencies list and optionally a short install note so contributors can run
the documented validation step end-to-end; ensure the addition appears alongside
the existing dev deps referenced in the Development Dependencies section.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1b11019c-f6ab-4824-a463-31764267ad08

📥 Commits

Reviewing files that changed from the base of the PR and between 54a7749 and 934d41c.

📒 Files selected for processing (6)
  • .github/workflows/ci.yaml
  • .pre-commit-config.yaml
  • .rumdl.toml
  • AGENTS.md
  • CONTRIBUTING.md
  • README.md
✅ Files skipped from review due to trivial changes (3)
  • .pre-commit-config.yaml
  • AGENTS.md
  • .rumdl.toml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/ci.yaml

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@CONTRIBUTING.md`:
- Line 54: Add a small installation subsection for rumdl in CONTRIBUTING.md
after the bashunit install section that mirrors the existing pattern (include
the tool name "rumdl", the specific version v0.1.68 used by pre-commit/CI, and
an install command or link), and reference that it can also be installed
automatically via the pre-commit hook; update the README text near the
validation commands (the validation command mention around "rumdl") so readers
can run/install rumdl end-to-end.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 58a20cf6-6fe8-470a-9b44-daf1d39baa37

📥 Commits

Reviewing files that changed from the base of the PR and between 934d41c and dfc02d1.

📒 Files selected for processing (6)
  • .github/workflows/ci.yaml
  • .pre-commit-config.yaml
  • .rumdl.toml
  • AGENTS.md
  • CONTRIBUTING.md
  • README.md
✅ Files skipped from review due to trivial changes (3)
  • .rumdl.toml
  • .pre-commit-config.yaml
  • AGENTS.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/ci.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants