Skip to content

feat: add markdownlint linting to CI#87

Merged
kami619 merged 3 commits into
red-hat-data-services:mainfrom
tarun-etikala:feat/markdownlint
Apr 30, 2026
Merged

feat: add markdownlint linting to CI#87
kami619 merged 3 commits into
red-hat-data-services:mainfrom
tarun-etikala:feat/markdownlint

Conversation

@tarun-etikala
Copy link
Copy Markdown
Contributor

@tarun-etikala tarun-etikala commented Apr 30, 2026

Description

Add markdownlint as a blocking CI check alongside ruff in a consolidated Code Quality workflow, and fix all existing violations across the repo.

  • Replace .github/workflows/ruff.yml with .github/workflows/code-quality.yml (ruff + markdownlint)
  • Add .markdownlint.jsonc (rule config with comments) and .markdownlint-cli2.yaml (ignore patterns)
  • Fix all existing markdownlint violations across 22 markdown files
  • Update CONTRIBUTING.md with markdownlint usage instructions

Lint fixes include

  • MD001: Fix heading level hierarchy in 8 agent READMEs (promote ####### under ## Local Development)
  • MD040: Add language specifiers to bare fenced code blocks
  • MD051: Fix broken link fragment in autogen mcp_agent README
  • Auto-fixed: trailing whitespace, blank lines around headings/lists/fences, bare URLs, ordered list numbering

Jira Ticket

RHAIENG-4067

Testing

  • Code Quality workflow passes on this PR (ruff + markdownlint)
  • Verify npx markdownlint-cli2 "**/*.md" reports 0 errors locally
  • Verify ruff check . && ruff format --check . still passes

Checklist

  • I have read CONTRIBUTING.md
  • No .env or secret files are included in this PR
  • All changes are within scope of the linked Jira ticket

Review Guidance

  • Commit 1 (feat: add markdownlint linting to CI): Config files and CI workflow — review the rule choices in .markdownlint.jsonc and ignore patterns in .markdownlint-cli2.yaml
  • Commit 2 (docs: fix markdownlint violations): Bulk lint fixes — heading level corrections in agent READMEs are the most substantive changes; the rest are whitespace/formatting auto-fixes

Related PRs

🤖 Generated with Claude Code

tarun-etikala and others added 2 commits April 30, 2026 08:17
- Add .markdownlint.jsonc with commented rule configuration
- Add .markdownlint-cli2.yaml with ignore patterns for venvs and generated files
- Replace ruff.yml with consolidated code-quality.yml (ruff + markdownlint)
- Update CONTRIBUTING.md with markdownlint usage instructions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 30, 2026

📝 Walkthrough

Walkthrough

Adds markdownlint to CI by renaming and updating the workflow to "Code Quality" and adding lint steps/config; also applies widespread Markdown formatting fixes (fenced languages, heading levels, spacing, trailing newlines) across README, docs, agent READMEs, and templates.

Changes

Cohort / File(s) Summary
CI Workflow & Linting config
.github/workflows/code-quality.yml, .markdownlint-cli2.yaml, .markdownlint.jsonc
Renamed workflow to "Code Quality", adjusted concurrency key, added a Markdownlint job step, introduced/extended markdownlint config and ignore globs.
Issue template & core docs
.github/ISSUE_TEMPLATE/bug_report.md, AGENTS.md, CONTRIBUTING.md, MAINTAINERS.md, README.md
Whitespace and formatting tweaks: insert/remove blank lines, set code-fence languages, update link rendering, and add markdownlint guidance to CONTRIBUTING.
Agent README files (bulk)
agents/a2a/.../README.md, agents/autogen/.../README.md, agents/crewai/.../README.md, agents/google/.../README.md, agents/langflow/.../README.md, agents/langgraph/.../README.md, agents/llamaindex/.../README.md, agents/vanilla_python/.../README.md
Standardized markdown: adjusted heading levels, fixed list indentation, added/changed fenced block language tags (text, ini, bash, python), inserted blank lines, and ensured trailing newlines.
Docs & guides
docs/adding-a-new-agent.md, docs/adding-behavioral-tests.md, docs/local-development.md, docs/openshift-deployment.md, tracing.md
Added explicit fenced languages, normalized spacing and blank lines, improved code block rendering, and ensured proper file termination with trailing newlines.
Templates & EOF fixes
agents/autogen/mcp_agent/mcp_automl_template/AUTOML_DEPLOYMENT.md, agents/autogen/mcp_agent/mcp_automl_template/README.md, ...
Fixed end-of-file newline issues and minor formatting in a few template/README files.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding markdownlint linting to CI workflow alongside ruff, which is the primary objective of this PR.
Description check ✅ Passed The description thoroughly explains the PR objectives, including configuration changes, violation fixes, testing verification, and detailed review guidance for multiple commits.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

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

Review rate limit: 9/10 reviews remaining, refill in 6 minutes.

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

Copy link
Copy Markdown
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: 1

🧹 Nitpick comments (1)
CONTRIBUTING.md (1)

38-41: ⚡ Quick win

Use markdownlint-cli2@0.22.1 to match CI version

Lines 39-40 currently use unpinned npx, which pulls the latest version and can differ from the pinned GitHub Action. The CI workflow uses markdownlint-cli2-action@v23.0.0, which internally uses markdownlint-cli2 v0.22.1. Pin local commands to the same version for consistency.

Proposed doc update
- npx markdownlint-cli2 "**/*.md"          # lint
- npx markdownlint-cli2 --fix "**/*.md"    # auto-fix
+ npx markdownlint-cli2@0.22.1 "**/*.md"          # lint
+ npx markdownlint-cli2@0.22.1 --fix "**/*.md"    # auto-fix
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CONTRIBUTING.md` around lines 38 - 41, Update the CONTRIBUTING.md lint
commands to pin markdownlint-cli2 to v0.22.1 so local runs match CI: replace the
unpinned npx commands (`npx markdownlint-cli2 "**/*.md"` and `npx
markdownlint-cli2 --fix "**/*.md"`) with invocations that reference
markdownlint-cli2@0.22.1 (e.g., using `npx markdownlint-cli2@0.22.1 ...`) so
both lint and auto-fix use the same version as the CI action.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@agents/langflow/simple_tool_calling_agent/README.md`:
- Line 208: The README's LlamaStack internal endpoint example is malformed due
to stray angle-bracket escapes; update the snippet so the hostname uses a proper
templated form (e.g.
http://llamastack-service.<namespace>.svc.cluster.local:8321/v1) instead of
`<http://llamastack-service.\><namespace\>...`; locate the table row containing
"Via LlamaStack (internal)" and replace the broken
`<http://llamastack-service.\><namespace\>.svc.cluster.local:8321/v1` with the
corrected `http://llamastack-service.<namespace>.svc.cluster.local:8321/v1`
string so users can copy a valid endpoint.

---

Nitpick comments:
In `@CONTRIBUTING.md`:
- Around line 38-41: Update the CONTRIBUTING.md lint commands to pin
markdownlint-cli2 to v0.22.1 so local runs match CI: replace the unpinned npx
commands (`npx markdownlint-cli2 "**/*.md"` and `npx markdownlint-cli2 --fix
"**/*.md"`) with invocations that reference markdownlint-cli2@0.22.1 (e.g.,
using `npx markdownlint-cli2@0.22.1 ...`) so both lint and auto-fix use the same
version as the CI action.
🪄 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: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: b6274c56-936c-498d-912b-6afdab76a21c

📥 Commits

Reviewing files that changed from the base of the PR and between 07331fe and 2084d7b.

📒 Files selected for processing (26)
  • .github/ISSUE_TEMPLATE/bug_report.md
  • .github/workflows/code-quality.yml
  • .markdownlint-cli2.yaml
  • .markdownlint.jsonc
  • AGENTS.md
  • CONTRIBUTING.md
  • MAINTAINERS.md
  • README.md
  • agents/a2a/langgraph_crewai_agent/README.md
  • agents/autogen/mcp_agent/README.md
  • agents/autogen/mcp_agent/mcp_automl_template/AUTOML_DEPLOYMENT.md
  • agents/autogen/mcp_agent/mcp_automl_template/README.md
  • agents/crewai/websearch_agent/README.md
  • agents/google/adk/README.md
  • agents/langflow/simple_tool_calling_agent/README.md
  • agents/langgraph/agentic_rag/README.md
  • agents/langgraph/human_in_the_loop/README.md
  • agents/langgraph/react_agent/README.md
  • agents/langgraph/react_with_database_memory/README.md
  • agents/llamaindex/websearch_agent/README.md
  • agents/vanilla_python/openai_responses_agent/README.md
  • docs/adding-a-new-agent.md
  • docs/adding-behavioral-tests.md
  • docs/local-development.md
  • docs/openshift-deployment.md
  • tracing.md
💤 Files with no reviewable changes (1)
  • MAINTAINERS.md

Comment thread agents/langflow/simple_tool_calling_agent/README.md Outdated
The default glob *.{md,markdown} only matches root-level files.
Use **/*.md to lint all markdown files in subdirectories.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
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.

🧹 Nitpick comments (1)
CONTRIBUTING.md (1)

38-41: Consider updating markdownlint-cli2 in CI to match the local development version.

The CONTRIBUTING.md specifies markdownlint-cli2@0.22.1 (the latest version), while the GitHub Action DavidAnson/markdownlint-cli2-action@v23.0.0 bundles markdownlint-cli2@0.22.0. Although this is only a patch version difference, aligning versions between local and CI environments prevents potential inconsistencies.

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

In `@CONTRIBUTING.md` around lines 38 - 41, The CONTRIBUTING.md uses
markdownlint-cli2@0.22.1 while the GitHub Action
DavidAnson/markdownlint-cli2-action@v23.0.0 bundles 0.22.0; pick one source of
truth and align them: either change the CLI references in CONTRIBUTING.md (the
two lines invoking markdownlint-cli2) to `@0.22.0` to match the action, or update
the workflow using DavidAnson/markdownlint-cli2-action@v23.0.0 to a release that
bundles 0.22.1 (or replace the action with an explicit install of
markdownlint-cli2@0.22.1) so both local dev (CONTRIBUTING.md) and CI (GitHub
Action) use the same markdownlint-cli2 patch version.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@CONTRIBUTING.md`:
- Around line 38-41: The CONTRIBUTING.md uses markdownlint-cli2@0.22.1 while the
GitHub Action DavidAnson/markdownlint-cli2-action@v23.0.0 bundles 0.22.0; pick
one source of truth and align them: either change the CLI references in
CONTRIBUTING.md (the two lines invoking markdownlint-cli2) to `@0.22.0` to match
the action, or update the workflow using
DavidAnson/markdownlint-cli2-action@v23.0.0 to a release that bundles 0.22.1 (or
replace the action with an explicit install of markdownlint-cli2@0.22.1) so both
local dev (CONTRIBUTING.md) and CI (GitHub Action) use the same
markdownlint-cli2 patch version.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: 98e6574a-89e5-46ac-b434-d4947a69d3a6

📥 Commits

Reviewing files that changed from the base of the PR and between fe644a5 and f8d121c.

📒 Files selected for processing (3)
  • .github/workflows/code-quality.yml
  • CONTRIBUTING.md
  • agents/langflow/simple_tool_calling_agent/README.md
✅ Files skipped from review due to trivial changes (2)
  • .github/workflows/code-quality.yml
  • agents/langflow/simple_tool_calling_agent/README.md

@mpk-droid
Copy link
Copy Markdown
Contributor

Are actionlint and pre-commit integration (the remaining RHAIENG-4067 scope) planned as follow-up PRs?

Assisted by Claude Opus 4.6 (1M context)

Comment thread CONTRIBUTING.md
Run locally before pushing:

```bash
npx markdownlint-cli2@0.22.1 "**/*.md" # lint
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.

Suggestion: since the repo is Python-only (uv, ruff), running markdownlint locally requires Node.js/npm which developers may not have. Consider adding a note that local linting is optional — CI will catch violations on push anyway. Something like: "Requires Node.js. Optional — the Code Quality CI workflow catches violations automatically."

Assisted by Claude Opus 4.6 (1M context)

Copy link
Copy Markdown
Contributor

@mpk-droid mpk-droid left a comment

Choose a reason for hiding this comment

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

lgtm

@kami619 kami619 merged commit 353500c into red-hat-data-services:main Apr 30, 2026
3 checks passed
@tarun-etikala
Copy link
Copy Markdown
Contributor Author

Are actionlint and pre-commit integration (the remaining RHAIENG-4067 scope) planned as follow-up PRs?

Assisted by Claude Opus 4.6 (1M context)

Yes. Will include the suggestion in that PR

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants