Skip to content

refactor(reporter): use badgelib for badge rendering - #962

Open
vladkens wants to merge 1 commit into
kucherenko:masterfrom
vladkens:use-badgelib-for-badges
Open

refactor(reporter): use badgelib for badge rendering#962
vladkens wants to merge 1 commit into
kucherenko:masterfrom
vladkens:use-badgelib-for-badges

Conversation

@vladkens

@vladkens vladkens commented Aug 25, 2026

Copy link
Copy Markdown

Hi! I came across jscpd and liked that it can publish duplication results as SVG badges alongside its other reports. The current renderer works, but badge layout and SVG generation are separate from jscpd's core task of detecting duplicated code and still need to be maintained.

I work on badges.ws and maintain badgelib, a tested Rust library for generating badges. This PR uses it for the rendering step while jscpd retains control over the reported values, thresholds, colors, labels, and output files.

The change is small and preserves the reporter's current behavior. The badges become slightly more compact, and the trade-off is adding a rendering dependency; in return, jscpd no longer needs to maintain its own SVG renderer. What do you think?


This change is Reviewable

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