Skip to content

Add Markdown lint/format#3954

Merged
arkid15r merged 7 commits intoOWASP:mainfrom
gopal-lohar:feature/markdown-lint-format
Feb 15, 2026
Merged

Add Markdown lint/format#3954
arkid15r merged 7 commits intoOWASP:mainfrom
gopal-lohar:feature/markdown-lint-format

Conversation

@gopal-lohar
Copy link
Contributor

Proposed change

Resolves #3947

Add pre-commit hook for markdown linting and formatting.

Checklist

  • Required: I followed the contributing workflow
  • Required: I verified that my code works as intended and resolves the issue as described
  • Required: I ran make check-test locally: all warnings addressed, tests passed
  • I used AI for code, documentation, tests, or communication related to this PR

@github-actions github-actions bot added the docs Improvements or additions to documentation label Feb 15, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 15, 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

Adds markdownlint configuration and a pre-commit markdownlint hook; applies formatting and lint-disable annotations across repository Markdown files and updates the PR template. No code or public API changes; most edits are presentation or linter config.

Changes

Cohort / File(s) Summary
Linting config & hook
/.markdownlint.yaml, /.pre-commit-config.yaml
Adds .markdownlint.yaml with rule overrides (MD003: atx, MD004: dash, MD013/MD024/MD033/MD041 disabled, MD046: fenced) and registers igorshubovych/markdownlint-cli@v0.47.0 in pre-commit to run markdownlint --fix on *.md.
PR template & README
.github/PULL_REQUEST_TEMPLATE.md, README.md
Removes a leading blank line in the PR template; adds an inline MD059 disable comment to the Slack line in README.md.
Code of Conduct & docs
CODE_OF_CONDUCT.md, docs/code-of-conduct.md, docs/contributing.md, docs/index.md
Formatting and presentation edits: reflowed bullets, list marker normalization, spacing adjustments, added markdownlint disable comments for MkDocs rendering, and some duplicated/reordered bullets in CODE_OF_CONDUCT.md.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • kasya
  • arkid15r
🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding Markdown linting and formatting capabilities to the repository.
Description check ✅ Passed The description is directly related to the changeset, explaining that it adds a pre-commit hook for Markdown linting and formatting to resolve issue #3947.
Linked Issues check ✅ Passed The PR successfully implements the automated Markdown linter/formatter requested in #3947 by adding .markdownlint.yaml configuration, pre-commit hook integration, and applying formatting changes across documentation files.
Out of Scope Changes check ✅ Passed All changes are within scope: configuration files for linting, pre-commit integration, and documentation formatting to comply with the new linting rules represent expected outcomes of the linting implementation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

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

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

4 issues found across 8 files

Confidence score: 3/5

  • Multiple MkDocs admonitions/tabs in docs/contributing.md and docs/code-of-conduct.md are now wrapped in plaintext blocks or unindented, which will visibly break documentation rendering for end users.
  • While these are documentation-only changes, the impact is concrete (empty admonition boxes and misplaced text), so there is some user-facing risk despite low runtime impact.
  • Pay close attention to docs/contributing.md and docs/code-of-conduct.md - fix admonition indentation/tab formatting and avoid wrapping content in plaintext blocks.
Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="docs/contributing.md">

<violation number="1" location="docs/contributing.md:39">
P1: Wrapping MkDocs admonition/tab content in a `plaintext` code block breaks the rendered documentation. The `=== "WSL Installation"` tabs, `!!! danger` nested admonition, and all markdown formatting inside will render as literal plain text instead of interactive MkDocs elements. This section should be excluded from the markdown linter's auto-formatting (or the linter should be configured to understand MkDocs syntax extensions) and the original indented structure should be preserved.</violation>
</file>

<file name="docs/code-of-conduct.md">

<violation number="1" location="docs/code-of-conduct.md:13">
P1: This text was previously indented content inside the `!!! quote "Community Pledge"` MkDocs admonition. Wrapping it in a `` ```plaintext `` code block outside the admonition breaks the rendering: the text now appears as a monospace code block instead of styled prose within the quote admonition. The indented format should be preserved for correct MkDocs Material rendering.</violation>

<violation number="2" location="docs/code-of-conduct.md:45">
P1: The responsibilities content was moved out of the `!!! info "Leadership Role"` admonition and wrapped in a code block. In MkDocs Material, admonition content must be indented (4 spaces) under the `!!!` directive. The blank line after the directive header without indented content means the admonition will render as an empty box, and the list inside `` ```plaintext `` will render as monospace text, not an actual bullet list.</violation>

<violation number="3" location="docs/code-of-conduct.md:57">
P1: The reporting content was moved out of the `!!! tip "Reporting Violations"` admonition. The text and link are no longer indented under the `!!!` directive, so the admonition renders as an empty box. Additionally, wrapping the complaints sentence in `` ```plaintext `` renders it as monospace code instead of normal text. Restore the 4-space indentation to keep this content inside the admonition.</violation>
</file>

Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Add one-off context when rerunning by tagging @cubic-dev-ai with guidance or docs links (including llms.txt)
  • Ask questions if you need clarification on any suggestion

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Contributor

@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: 3

🤖 Fix all issues with AI agents
In @.markdownlint.yaml:
- Around line 1-22: Add MD041: false to the global rules in .markdownlint.yaml
to avoid sprinkling per-file disables for first-line headings, and mitigate
MkDocs auto-fix issues by either adding a .markdownlintignore entry for docs
paths that use MkDocs-specific syntax (e.g., files with "!!!" admonitions or
"===" tab syntax) or by disabling the specific rules that --fix rewrites those
constructs; update the .markdownlint.yaml to include MD041: false and
create/update a .markdownlintignore to exclude your docs directory (or list the
problematic files) so pre-commit does not auto-fix MkDocs-specific patterns.

In `@docs/code-of-conduct.md`:
- Around line 13-16: Remove the unintended ```plaintext code fences around the
prose sections and restore them to normal Markdown (or place them in appropriate
MkDocs admonitions); specifically un-fence the pledge paragraph starting "We
pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community." and do the same for the "leadership
responsibilities" block and the "complaints notice" block so those passages
render as regular text rather than monospace code. Ensure there are no leftover
fence markers and that paragraph breaks/line wraps are preserved to match
surrounding Markdown formatting.

In `@docs/contributing.md`:
- Around line 39-54: Remove the enclosing ```plaintext``` code fence so MkDocs
directives are parsed: take the tab blocks starting with === "WSL Installation"
and === "Docker Desktop Setup" and the admonition starting with !!! danger
"PowerShell Not Supported" out of the code block and restore them as regular
Markdown lines (preserve their exact directive text); additionally, prevent
future auto-fixes from wrapping MkDocs syntax by adding patterns for these
directives to the Markdown linter ignore (e.g., add MkDocs-specific patterns to
.markdownlintignore) or place an inline <!-- markdownlint-disable -->/<!--
markdownlint-enable --> around the MkDocs directive region.
🧹 Nitpick comments (3)
docs/index.md (1)

5-6: Consider disabling MD041 globally in .markdownlint.yaml instead of per-file.

Since this repository uses MkDocs with YAML front matter, MD041 (first line should be a top-level heading) will likely fire on every docs file that has front matter. A global disable in .markdownlint.yaml would be cleaner than scattering <!-- markdownlint-disable MD041 --> across multiple files (this pattern already appears in README.md, PULL_REQUEST_TEMPLATE.md, and here).

.github/PULL_REQUEST_TEMPLATE.md (1)

1-1: Inline disable comment will be removed along with the paragraph.

The instructions say to "REMOVE THIS PARAGRAPH BEFORE OPENING THE PR." When contributors do so, the <!-- markdownlint-disable MD041 --> comment will also be removed. This is fine for the actual PR, but it means the lint suppression only works while editing the template itself.

This is another case where a global MD041 disable in .markdownlint.yaml (or an .markdownlint.yaml override/ignore for this file) would be more robust.

README.md (1)

74-74: Use markdownlint-disable-line for single-line suppression.

The inline <!-- markdownlint-disable MD059 --> disables the rule for the remainder of the file, not just the current line. Use markdownlint-disable-line to suppress only line 74. MD059 is the "descriptive-link-text" rule (valid since markdownlint v0.38.0), which warns about generic link text like "here"—correctly flagged in your [here](...) link.

-- [Slack channel](https://owasp.slack.com/archives/project-nest) (join [here](https://owasp.org/slack/invite)) <!-- markdownlint-disable MD059 -->
+- [Slack channel](https://owasp.slack.com/archives/project-nest) (join [here](https://owasp.org/slack/invite)) <!-- markdownlint-disable-line MD059 -->


We encourage behaviors that contribute to a positive environment:

- Demonstrating empathy and kindness toward other people
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gopal-lohar gopal-lohar changed the title Feature/markdown lint format Add Markdown lint/format Feb 15, 2026
@gopal-lohar gopal-lohar force-pushed the feature/markdown-lint-format branch from df4cd12 to 748624d Compare February 15, 2026 18:57
coderabbitai[bot]
coderabbitai bot previously approved these changes Feb 15, 2026
@gopal-lohar gopal-lohar force-pushed the feature/markdown-lint-format branch from 748624d to 717c1ed Compare February 15, 2026 19:47
@gopal-lohar gopal-lohar marked this pull request as ready for review February 15, 2026 19:55
@arkid15r arkid15r enabled auto-merge February 15, 2026 20:42
Copy link
Collaborator

@arkid15r arkid15r left a comment

Choose a reason for hiding this comment

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

LGTM

@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Feb 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.77%. Comparing base (3937ce8) to head (b2a9388).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3954   +/-   ##
=======================================
  Coverage   96.77%   96.77%           
=======================================
  Files         512      512           
  Lines       15823    15823           
  Branches     2168     2127   -41     
=======================================
  Hits        15312    15312           
  Misses        422      422           
  Partials       89       89           
Flag Coverage Δ
backend 95.99% <ø> (ø)
frontend 99.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3937ce8...b2a9388. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@arkid15r arkid15r added this pull request to the merge queue Feb 15, 2026
Merged via the queue into OWASP:main with commit ec66d52 Feb 15, 2026
35 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Feb 19, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add markdown linter

2 participants

Comments