NAME
Test::CPAN::Health::Reporter::Markdown - Render a health report as GitHub-Flavoured Markdown
SYNOPSIS
use Test::CPAN::Health::Reporter::Markdown;
my $reporter = Test::CPAN::Health::Reporter::Markdown->new;
my $md = $reporter->render($report);
print $md;
DESCRIPTION
Produces GitHub-Flavoured Markdown from a Test::CPAN::Health::Report. The output is suitable for PR comments, README badge sections, or wiki pages.
The document includes a header, a weighted score line with an emoji badge, a summary counts line, a Markdown results table, collapsible detail blocks for warn/fail/error results, and a trailing shields.io badge URL comment.
LIMITATIONS
Pipe characters and backslashes in check summaries are escaped for GFM table compatibility; other Markdown metacharacters are not escaped.
Detail strings are rendered verbatim inside
<details>blocks; HTML embedded in detail strings is not escaped.
render
PURPOSE
Render a Report to a GitHub-Flavoured Markdown string.
API SPECIFICATION
INPUT
report Test::CPAN::Health::Report required
OUTPUT
Scalar string (UTF-8). Ends with a trailing newline.
MESSAGES
Code | Severity | Message | Resolution
------+----------+------------------------------------+---------------------
MDR01 | FATAL | report must be a Report object | Pass a Report instance
FORMAL SPECIFICATION
-- Z schema (placeholder) --
RenderOp
report : Report
output : String
-------------------------------------------------------
#output > 0
output contains report.overall_score
SIDE EFFECTS
None.
USAGE EXAMPLE
my $md = $reporter->render($report);
print $md;
AUTHOR
Nigel Horne, <njh at nigelhorne.com>
LICENSE AND COPYRIGHT
Copyright (C) 2025-2026 Nigel Horne.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.