Skip to content

feat: add json, csv, html and markdown reports - #13

Merged
floriankraemer merged 4 commits into
mainfrom
feat/reports-a
Nov 12, 2026
Merged

floriankraemer merged 4 commits into
mainfrom
feat/reports-a

Conversation

@floriankraemer

Copy link
Copy Markdown
Owner

Summary

  • Replace the report builders with Report implementations selected by ReportType (json, csv, html, markdown); ReportWriter handles the directory check, UTF-8 and IO errors.
  • JSON is {class: {file, methods: {method: {...}}}} with optional deltas; CSV has consistent header and rows incl. weight deltas; HTML uses pinned Bootstrap 5.3.3 with SRI, escaped text, score highlighting and delta badges; Markdown honours the show* settings.
  • showOnlyMethodsExceedingThreshold applies to html and markdown only; json and csv contain everything. See docs/Reports.md.
  • application.report added to the PIT targets.

Test plan

  • Golden files for every format, grouped/single, with and without deltas; escaping, locale, missing directory, write failure, both-or-neither, invalid type
  • E2E per format via the CLI
  • ./mvnw -B verify green

Reports are grouped by class where it makes sense, honour the show* settings in
markdown, and are written as UTF-8 with clear errors for a missing directory or
an unwritable file. A new format is one Report class plus one ReportType entry.
A class name found in more than one file is keyed <class>@<file> once per file.
…ly, survive NaN

Markdown and html share the json grouping, one section per class and file.
Markdown escapes angle brackets, backticks and line breaks. Reports are moved
into place from a temporary file. NaN and infinity render as N/A, or null in json.
@floriankraemer
floriankraemer merged commit 3c55da6 into main Nov 12, 2026
1 check passed
@floriankraemer
floriankraemer deleted the feat/reports-a branch November 12, 2026 18:47
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.

1 participant