SimonKagstrom / kcov

Code coverage tool for compiled programs, Python and Bash which uses debugging information to collect and report data without special compilation options
http://simonkagstrom.github.io/kcov/
GNU General Public License v2.0
709 stars 109 forks source link

Feature request: --report-format=xml,json,vendorName #453

Open williamdes opened 1 month ago

williamdes commented 1 month ago

It could be nice to filter the type of report to produce, this would save some computing time

What do you think ?

SimonKagstrom commented 1 month ago

There's --cobertura-only, which I use for vscode (see doc/vscode.md), but nothing in general.

I think the main advantage is less clutter, since performance is typically dominated by the breakpoints anyway.

williamdes commented 1 month ago

Could we have an option to not have the .so files and html stuff ? Only report files (xml/json)

SimonKagstrom commented 1 month ago

Well, it's basically what --cobertura-only does:

ska@Simons-MacBook-Air kcov % ls /tmp/kcov
cov.xml     coverage.db

but the so-files are needed (well, sometimes) for execution and needs to be stored somewhere. I guess they could be removed afterwards, but I tend to see the output directory as ephemeral anyway so typically just delete the entire directory when I'm done.

Anyway, I think your feature makes sense, and --cobertura-only would then be a special case meaning the same thing as --report-format=xml.

williamdes commented 1 month ago

Anyway, I think your feature makes sense, and --cobertura-only would then be a special case meaning the same thing as --report-format=xml.

Good idea Is there only one output format ? Maybe they should be documented because I could not figure it out myself :)

SimonKagstrom commented 1 month ago

Anyway, I think your feature makes sense, and --cobertura-only would then be a special case meaning the same thing as --report-format=xml.

Good idea Is there only one output format ? Maybe they should be documented because I could not figure it out myself :)

Yes, there are 6 in total. They are documented via the README, but for now they have all always been written so no specific options (except for coveralls-only, which is mainly for vscode).