Skip to content

feat: add per-severity counts to the code issues badge JSON - #72

Merged
ehennestad merged 3 commits into
mainfrom
add-code-issue-counts-to-badge-json
Oct 15, 2026
Merged

ehennestad merged 3 commits into
mainfrom
add-code-issue-counts-to-badge-json

Conversation

@ehennestad

@ehennestad ehennestad commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

codecheckToolbox writes the code issues badge as docs/reports/badges/code_issues.json with label, message and color, and matbox-actions renders that file to .github/badges/code_issues.svg. This adds a counts field with the error, warning and info counts, so matbox-actions can draw one badge segment per severity (ehennestad/matbox-actions#26).

The label, message and color fields are unchanged. matbox-actions versions that ignore counts keep rendering the current single badge.

writeBadgeJSONFile and the internal createBadge take an optional Counts name-value argument. The field is written only when Counts is given, so the tests badge and the "tested with" badge JSON are unchanged. The legacy pybadges SVG fallback ignores the counts.

TasksTest checks that the counts are present and add up to the total in the message, and that writeBadgeJSONFile omits the field by default.

🤖 Generated with Claude Code

codecheckToolbox now writes the error, warning and info counts to a
"counts" field in code_issues.json, so matbox-actions can draw one
badge segment per severity. The label, message and color fields are
unchanged, so renderers that ignore the counts still draw the current
single badge.

writeBadgeJSONFile and the internal createBadge take an optional
Counts name-value argument. The field is omitted when Counts is
empty, which keeps every other badge JSON unchanged. The legacy
pybadges SVG fallback ignores the counts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

37 tests   37 ✅  31s ⏱️
 6 suites   0 💤
 1 files     0 ❌

Results for commit e7c78b8.

♻️ This comment has been updated with latest results.

@ehennestad
ehennestad merged commit 500edc5 into main Oct 15, 2026
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