pjcj / Devel--Cover

Code coverage metrics for Perl
http://www.pjcj.net/perl.html
93 stars 87 forks source link

Convert Devel-Cover db to lcov data format #327

Closed henry2cox closed 6 months ago

henry2cox commented 10 months ago

I would like to use some features of lcov to analyze perl components in some projects. lcov itself is one such project :-)

Specifically, I would like differential coverage as well as date binning (described in https://arxiv.org/abs/2008.07947 or https://ieeexplore.ieee.org/document/9438597) - as well as to include perl components a unified project coverage report, and to add perl code to the coverage criteria used by the corresponding jenkins job.

The easiest way I can think of to do that is to translate Devel-Cover data into lcov .info file format.

The lcov ".info" file format is pretty simple - and more-or-less described in the geninfo man page.

Brief perusal suggests that it is not spectacularly difficult to write a screen scraper to convert the Devel-Cover HTML report to lcov format, for line, branch, and subroutine types - but it would likely be easier to write the format directly. I wondered if somebody had already done either of those - and could point me to the code.

Thanks

Henry

henry2cox commented 6 months ago

Addressed by perl2lcov script in lcov repo - see commit 7bbc2b80b6d8,

pjcj commented 6 months ago

Thanks for doing this!