Skip to content

chore(render): split markdown renderer into modules#44

Merged
Metbcy merged 1 commit intoMetbcy:mainfrom
Wpelletier01:main
May 10, 2026
Merged

chore(render): split markdown renderer into modules#44
Metbcy merged 1 commit intoMetbcy:mainfrom
Wpelletier01:main

Conversation

@Wpelletier01
Copy link
Copy Markdown
Contributor

What this PR does

Keep the markdown renderer easier to maintain by separating each output section into focused modules without changing the public rendering API.

The existing renderer tests were moved alongside their section modules so each file stays smaller and easier to review, including respecting the 25 KB size limit.

Test coverage

  • No new tests (explain why below)

No new behavior was added. Existing markdown renderer unit coverage was preserved and split into the relevant module files with the implementation.

Verification gates

  • cargo fmt --all --check clean
  • cargo clippy --all-targets --all-features -- -D warnings clean
  • cargo test --release clean
  • bash examples/run-all.sh clean (if behavior or rendered-output changes touched the example fixtures)
  • mdbook build docs clean (if any docs/src/**.md changed)

bash examples/run-all.sh is not clean because the pinned example outputs are not up to date. The current renderer emits the Maintainer set changed summary row and detail section, but examples/*/expected-output.md still reflects the older output shape.

Linked issues

#30

Keep the markdown renderer easier to maintain by separating each output section into focused modules without changing the public rendering API.
@Metbcy Metbcy self-requested a review May 10, 2026 07:56
Copy link
Copy Markdown
Owner

@Metbcy Metbcy left a comment

Choose a reason for hiding this comment

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

Code Review Summary

Verdict: Approved

No blocking findings.

What I checked

  • Renderer split from the old monolithic src/render/markdown.rs into focused modules.
  • Public API compatibility for render, render_with_options, Options, and Platform.
  • Section ordering and short-circuit behavior for empty diffs and summary-only mode.
  • Deterministic rendering concerns, especially sorted vulnerability and plugin output.
  • Merge-ref validation against current base.

Verification

  • cargo fmt --all --check clean
  • cargo clippy --all-targets --all-features -- -D warnings clean
  • cargo test --release clean: 391 unit tests, 36 CLI tests, 9 integration tests, 7 real-world tests, 1 doctest

Looks like a clean maintainability refactor with behavior preserved.

@Metbcy
Copy link
Copy Markdown
Owner

Metbcy commented May 10, 2026

Thank you for your collaboration @Wpelletier01!

@Metbcy Metbcy merged commit c2a9b37 into Metbcy:main May 10, 2026
9 of 10 checks passed
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