Skip to content

Configure markdownlint rules - #124

Merged
leynos merged 4 commits into
mainfrom
codex/update-markdownlint-configuration-and-format
Sep 13, 2025
Merged

Configure markdownlint rules#124
leynos merged 4 commits into
mainfrom
codex/update-markdownlint-configuration-and-format

Conversation

@leynos

@leynos leynos commented Sep 12, 2025

Copy link
Copy Markdown
Owner

Summary

  • align markdownlint with project style and ignore patterns
  • reformat markdown docs to meet lint and formatting expectations

Testing

  • mdformat-all
  • make fmt
  • make lint
  • make test
  • make markdownlint
  • make nixie (fails: "nixie: No such file or directory")

https://chatgpt.com/codex/tasks/task_e_68c29aed96b88322bec95c1de7066384

Summary by Sourcery

Configure and enable markdownlint for the project and update markdown documentation to conform to the new linting rules.

Enhancements:

  • Add .markdownlint-cli2.jsonc configuration to align markdownlint rules with project style and ignore patterns
  • Reformat all markdown guides to satisfy lint rules and consistent formatting

Documentation:

  • Normalize fenced code block language identifiers and correct ordered list numbering in documentation

@sourcery-ai

sourcery-ai Bot commented Sep 12, 2025

Copy link
Copy Markdown
Contributor

Reviewer's Guide

This PR introduces a project-wide markdownlint configuration and applies automated formatting fixes across markdown documentation (code-fence normalization, list renumbering, blank-line cleanup) to align with the new rules.

File-Level Changes

Change Details Files
Add markdownlint configuration
  • Define project-specific lint rules and ignore patterns
  • Integrate file globs for docs and exclude vendor files
.markdownlint-cli2.jsonc
Reformat markdown documentation for lint compliance
  • Merge language tags into single fence markers (ini,toml,text)
  • Renumber ordered lists sequentially
  • Remove redundant blank lines around code blocks
docs/vk-end-to-end-testing-guide.md
docs/ortho-config-users-guide.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Sep 12, 2025

Copy link
Copy Markdown

Summary by CodeRabbit

  • Documentation

    • Overhauled E2E testing guide: switched to footnote citations, added Works Cited, clarified testing explanations, and standardised to British English.
    • Updated AGENTS guide with British English spelling adjustments.
  • Chores

    • Refined markdown linting configuration with explicit rule settings and an ignores list for common directories; removed obsolete inline comments.

Walkthrough

Update markdownlint configuration with explicit per-rule settings and ignore patterns. Revise documentation to use footnote citations and British English. Apply minor spelling edits in AGENTS.md. No code, API, or runtime changes.

Changes

Cohort / File(s) Summary of Changes
Markdownlint configuration
\.markdownlint-cli2.jsonc
Replace boolean disables with explicit rule configs (MD004, MD010, MD013, MD029, MD046). Add top-level ignores for .git, .venv, node_modules, target. Remove inline MD013 comments.
E2E testing guide (docs)
docs/vk-end-to-end-testing-guide.md
Convert inline numeric citations to footnotes; reword prose for clarity; adopt British English spellings; refine sections on testing stack, MITM proxy, and snapshots; migrate works cited to footnotes. No behavioural changes.
Agents doc spelling
AGENTS.md
Update “behavioral” → “behavioural” in two bullets.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Configure markdownlint rules #124 — Mirrors the markdownlint config updates and Markdown citation/format edits, indicating closely related documentation and tooling alignment.

Poem

Lints align, the dashes dash,
Footnotes march in tidy sash;
Behaviour wears its extra “u”,
Docs refined, their meaning true.
No code disturbed, no tests to rue—
Just cleaner paths for readers through. ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed Assess the title as concise and accurate: "Configure markdownlint rules" clearly summarises the primary change of adding a .markdownlint-cli2.jsonc and reformatting Markdown files to comply with the new linting rules.
Description Check ✅ Passed Mark the description as related and sufficient for this check: it summarises the configuration addition, lists the formatting and linting commands run, and notes the failing "make nixie" invocation, so it directly pertains to the changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/update-markdownlint-configuration-and-format

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6b7e267 and 62bd906.

📒 Files selected for processing (3)
  • .markdownlint-cli2.jsonc (1 hunks)
  • AGENTS.md (2 hunks)
  • docs/vk-end-to-end-testing-guide.md (28 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.md

📄 CodeRabbit inference engine (AGENTS.md)

**/*.md: Validate Markdown with make markdownlint
Run make fmt after doc changes to format Markdown and fix tables
Validate Mermaid diagrams in Markdown using make nixie
Wrap Markdown paragraphs and bullet points at 80 columns
Wrap code blocks at 120 columns in Markdown
Do not wrap tables and headings in Markdown
Use dashes (-) for list bullets in Markdown
Use GitHub-flavoured Markdown footnotes ([^1]) for references

Files:

  • AGENTS.md
  • docs/vk-end-to-end-testing-guide.md

⚙️ CodeRabbit configuration file

**/*.md: * Avoid 2nd person or 1st person pronouns ("I", "you", "we")

  • Use en-GB-oxendict (-ize / -our) spelling and grammar
  • Headings must not be wrapped.
  • Documents must start with a level 1 heading
  • Headings must correctly increase or decrease by no more than one level at a time
  • Use GitHub-flavoured Markdown style for footnotes and endnotes.
  • Numbered footnotes must be numbered by order of appearance in the document.

Files:

  • AGENTS.md
  • docs/vk-end-to-end-testing-guide.md
docs/**/*.md

📄 CodeRabbit inference engine (AGENTS.md)

docs/**/*.md: Use docs/ markdown as source of truth for requirements, dependencies, and architecture
Proactively update docs/ when decisions/requirements/dependencies change
Documentation uses en-GB-oxendict spelling/grammar (LICENSE name exempt)

Files:

  • docs/vk-end-to-end-testing-guide.md
🧠 Learnings (7)
📚 Learning: 2025-08-03T14:59:07.928Z
Learnt from: CR
PR: leynos/comenq#0
File: AGENTS.md:0-0
Timestamp: 2025-08-03T14:59:07.928Z
Learning: If refactoring is deemed necessary: Perform the refactoring as a separate, atomic commit after the functional change commit. Ensure the refactoring adheres to the testing guidelines (behavioral tests pass before and after, unit tests added for new units). Ensure the refactoring commit itself passes all quality gates.

Applied to files:

  • AGENTS.md
📚 Learning: 2025-08-06T22:18:56.467Z
Learnt from: CR
PR: leynos/lille#0
File: AGENTS.md:0-0
Timestamp: 2025-08-06T22:18:56.467Z
Learning: If refactoring is deemed necessary, perform the refactoring as a separate, atomic commit after the functional change commit. Ensure the refactoring adheres to the testing guidelines and passes all quality gates.

Applied to files:

  • AGENTS.md
📚 Learning: 2025-09-10T19:19:36.866Z
Learnt from: CR
PR: leynos/ortho-config#0
File: AGENTS.md:0-0
Timestamp: 2025-09-10T19:19:36.866Z
Learning: Perform refactors as separate atomic commits after functional change; ensure tests and quality gates pass

Applied to files:

  • AGENTS.md
📚 Learning: 2025-09-10T19:21:02.306Z
Learnt from: CR
PR: leynos/netsuke#0
File: AGENTS.md:0-0
Timestamp: 2025-09-10T19:21:02.306Z
Learning: Perform refactors as separate atomic commits after functional changes; ensure tests and quality gates pass

Applied to files:

  • AGENTS.md
📚 Learning: 2025-09-01T00:48:47.120Z
Learnt from: CR
PR: leynos/falcon-pachinko#0
File: AGENTS.md:0-0
Timestamp: 2025-09-01T00:48:47.120Z
Learning: Perform refactors as separate atomic commits after functional changes; ensure tests and quality gates still pass

Applied to files:

  • AGENTS.md
📚 Learning: 2025-08-17T00:50:47.834Z
Learnt from: CR
PR: leynos/ddlint#0
File: AGENTS.md:0-0
Timestamp: 2025-08-17T00:50:47.834Z
Learning: Perform refactors as separate atomic commits after functional changes and ensure tests/quality gates pass

Applied to files:

  • AGENTS.md
📚 Learning: 2025-09-04T17:39:23.811Z
Learnt from: CR
PR: leynos/cmd-mox#0
File: AGENTS.md:0-0
Timestamp: 2025-09-04T17:39:23.811Z
Learning: Perform refactors as separate atomic commits after functional changes, ensuring tests and quality gates pass

Applied to files:

  • AGENTS.md
🔍 Remote MCP Ref

Summary — additional facts to aid review

  • .markdownlint-cli2 supports per-rule configuration objects in .markdownlint-cli2.jsonc and a top-level ignores array (use glob patterns like "/node_modules/").

  • The PR’s rule IDs are standard markdownlint rules; verify option names match the rule docs:

    • MD004 — unordered-list style (e.g., "style": "dash").
    • MD013 — line-length rule; configurable line length and options to ignore code blocks/tables/headings.
    • MD029 — ordered-list-item-prefix (controls numbering style/format).
    • MD046 — code-block style (fenced vs indented).
  • Review checks to perform:

    • Confirm each option key in .markdownlint-cli2.jsonc exactly matches the markdownlint rule option names (typos/wrong keys may be ignored).
    • The PR summary mentions MD040 but the file contains MD046 — verify the intended rule ID. (PR context)
  • Notes from PR context: coderabbitai’s scan reports comma-separated fence-language issue resolved; ordered-list auto-numbering remains (MD029) in several files — re-run markdownlint or the ripgrep checks referenced in the PR comments to confirm remaining files. (PR context)

🔇 Additional comments (5)
AGENTS.md (2)

60-61: Align en‑GB spelling (“behavioural”) with repository standard.

Change is correct and consistent with docs style.


106-107: Align en‑GB spelling (“behavioural”) with repository standard.

Change is correct and consistent with docs style.

.markdownlint-cli2.jsonc (2)

5-10: Verify MD013 option keys against markdownlint’s latest schema.

Keys look right, but “headings”/“code_block_line_length” have differed across versions. Validate against the toolchain version used in CI.

What are the currently supported option keys for markdownlint rule MD013 (line-length), and is "headings" the correct key name alongside "code_block_line_length"?

11-12: Enable auto‑numbering for ordered lists (MD029 -> "one")

Change MD029 in .markdownlint-cli2.jsonc from "ordered" to "one":

-    "MD029": { "style": "ordered" },
+    "MD029": { "style": "one" },

Re-run lint and locate non‑conforming lists (previous verification returned "Linting: 0 file(s)" and ripgrep skipped files). Confirm the repo contains Markdown files, then run:

markdownlint-cli2
rg -nP '^\s*\d+\.\s' -g '!**/node_modules/**' | grep -v -E '^\s*1\.\s' || true
docs/vk-end-to-end-testing-guide.md (1)

142-151: Normalise fenced code language to a single identifier (“toml”).

Replacement of “ini,toml” with “toml” resolves comma‑separated language tags.


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

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes - here's some feedback:

  • Verify that comma-separated language tags in code fences (e.g., ```ini,toml) are supported by your markdown renderer; you may need to use a single language or separate fences instead.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Verify that comma-separated language tags in code fences (e.g., ```ini,toml) are supported by your markdown renderer; you may need to use a single language or separate fences instead.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 (3)
docs/vk-end-to-end-testing-guide.md (3)

142-150: Correct dev-dependencies to match examples and simplify code fence info string.

Add the predicates crate used in examples and use a single language hint to keep syntax highlighters happy.

-```ini,toml
+```toml
 [dev-dependencies]
 assert_cmd = "2.0"
 insta = { version = "1.34", features = ["redactions"] }
 third-wheel = "0.6"
 tokio = { version = "1.0", features = ["full"] }
 serde_json = "1.0"
 tempfile = "3.8"
+predicates = "3.1"

---

`400-406`: **Eliminate first‑person pronoun per docs style guide.**

Replace “our mock server” with “the mock server”.


```diff
-... send its API requests to our mock server instead of the real GitHub API.
+... send its API requests to the mock server instead of the real GitHub API.

1019-1115: Convert numbered “Works cited” to GitHub‑flavoured footnotes and update in‑text cites.

The docs standard requires GFM footnotes; the current numeric bibliography with trailing numbers in prose violates this. Replace the numbered list with [^n] definitions and update in‑text references in order of appearance.

Example replacement pattern:

  • In text: “... within the GitHub ecosystem.[^1]”
  • At end of file:
[^1]: Canop/termimad — GitHub. Accessed 2025‑07‑20. https://github.com/Canop/termimad
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 53ba608 and a5eb327.

📒 Files selected for processing (3)
  • .markdownlint-cli2.jsonc (1 hunks)
  • docs/ortho-config-users-guide.md (1 hunks)
  • docs/vk-end-to-end-testing-guide.md (3 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
docs/**/*.md

📄 CodeRabbit inference engine (AGENTS.md)

docs/**/*.md: Use the markdown files within the docs/ directory as a knowledge base and source of truth for project requirements, dependency choices, and architectural decisions.
Proactively update the relevant file(s) in the docs/ directory to reflect the latest state when new decisions are made, requirements change, libraries are added/removed, or architectural patterns evolve.

Files:

  • docs/ortho-config-users-guide.md
  • docs/vk-end-to-end-testing-guide.md
**/*.md

📄 CodeRabbit inference engine (AGENTS.md)

**/*.md: Documentation must use en-GB-oxendict spelling and grammar, except for the naming of the "LICENSE" file.
Validate Markdown files using make markdownlint.
Run make fmt after any documentation changes to format all Markdown files and fix table markup.
Validate Mermaid diagrams in Markdown files by running make nixie.
Markdown paragraphs and bullet points must be wrapped at 80 columns.
Code blocks in Markdown must be wrapped at 120 columns.
Tables and headings in Markdown must not be wrapped.
Use dashes (-) for list bullets in Markdown.
Use GitHub-flavoured Markdown footnotes ([^1]) for references and footnotes.

Files:

  • docs/ortho-config-users-guide.md
  • docs/vk-end-to-end-testing-guide.md

⚙️ CodeRabbit configuration file

**/*.md: * Avoid 2nd person or 1st person pronouns ("I", "you", "we")

  • Use en-GB-oxendict (-ize / -our) spelling and grammar
  • Headings must not be wrapped.
  • Documents must start with a level 1 heading
  • Headings must correctly increase or decrease by no more than one level at a time
  • Use GitHub-flavoured Markdown style for footnotes and endnotes.
  • Numbered footnotes must be numbered by order of appearance in the document.

Files:

  • docs/ortho-config-users-guide.md
  • docs/vk-end-to-end-testing-guide.md
⏰ Context from checks skipped due to timeout of 120000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Sourcery review
  • GitHub Check: build-test
🔇 Additional comments (3)
docs/ortho-config-users-guide.md (1)

247-259: Fix MD029 compliance of nested ordered list — LGTM.

The nested list items are now correctly sequential (2–5) and align with MD029 "ordered" style.

.markdownlint-cli2.jsonc (1)

3-12: Align markdownlint rules with house style — LGTM.

Rule settings match the documented standards (dash bullets, 80/120 wrapping, ordered lists).

docs/vk-end-to-end-testing-guide.md (1)

174-183: Use of ```text for directory tree — LGTM.

The code fence language is explicit and satisfies MD040.

Comment thread .markdownlint-cli2.jsonc Outdated
Comment thread docs/vk-end-to-end-testing-guide.md Outdated
codescene-delta-analysis[bot]

This comment was marked as outdated.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@leynos

leynos commented Sep 13, 2025

Copy link
Copy Markdown
Owner Author

@coderabbitai Have the following now been resolved?

  • Verify that comma-separated language tags in code fences (e.g., ```ini,toml) are supported by your markdown renderer; you may need to use a single language or separate fences instead.
  • To simplify maintenance and diffs, consider using ‘1.’ for all ordered-list items so markdown auto-numbers instead of manually incrementing each entry.

codescene-delta-analysis[bot]

This comment was marked as outdated.

@coderabbitai

This comment was marked as resolved.

@leynos
leynos force-pushed the codex/update-markdownlint-configuration-and-format branch from 6b7e267 to 62bd906 Compare September 13, 2025 23:42
@leynos
leynos merged commit fd56238 into main Sep 13, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant