Skip to content

Add richer metrics to JSON formatter#1164

Open
sferik wants to merge 1 commit intomainfrom
json-formatter-metrics
Open

Add richer metrics to JSON formatter#1164
sferik wants to merge 1 commit intomainfrom
json-formatter-metrics

Conversation

@sferik
Copy link
Copy Markdown
Collaborator

@sferik sferik commented Apr 4, 2026

Enhance the JSON coverage output with per-file coverage percentages, a total section with aggregate statistics, full group stats, and method coverage support.

Per-file output now includes covered_percent (always), and when enabled: branches_covered_percent and methods array with methods_covered_percent. The total and groups sections report full statistics (covered, missed, total, percent, strength) for each enabled coverage type (line, branch, method).

Breaking change: group stats change from { covered_percent: 80.0 } to the full stats shape with the key renamed to percent.

Based on the ideas in codeclimate-community/simplecov_json_formatter#12.

This comment was marked as resolved.

@sferik sferik force-pushed the json-formatter-metrics branch from 35f35b5 to 30e31e9 Compare April 4, 2026 17:37
Enhance the JSON coverage output with per-file coverage percentages, a
total section with aggregate statistics, full group stats, and method
coverage support.

Per-file output now includes covered_percent (always), and when enabled:
branches_covered_percent and methods array with methods_covered_percent.
The total and groups sections report full statistics (covered, missed,
total, percent, strength) for each enabled coverage type (line, branch,
method).

Breaking change: group stats change from { covered_percent: 80.0 } to
the full stats shape with the key renamed to percent.

Based on the ideas in codeclimate-community/simplecov_json_formatter#12.

Co-Authored-By: Tejas <tejas.shetty@mailbox.org>
@sferik sferik force-pushed the json-formatter-metrics branch from 30e31e9 to 8931869 Compare April 4, 2026 17: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.

2 participants