ThrowTheSwitch / Ceedling

Ruby-based unit testing and build system for C projects
http://throwtheswitch.org
Other
585 stars 246 forks source link

The gcov plugin should have better control over what gets coverage analysis #95

Open austinglaser opened 8 years ago

austinglaser commented 8 years ago

Currently, the gcov plugin may falsely assume some files need coverage that don't. For instance, a helper module containing reusable stubs for use as CMock callbacks will currently get coverage analysis.

We could try to get smarter with the logic determining which files should get coverage, but I suspect that this could be a rabbit hole, and is prone to frustrating problems.

I propose that instead we add a couple of parameters to the config:

tobyjwebb commented 5 years ago

Hi!

I'd like to implement the :exclude logic, unless anyone is already working on this? (I may need include logic also, but the exclude is more urgent for the time being.)

@mvandervoord

NOTE: I was having this problem because I was getting the local Ceedling/vendor headers in the html report. I've created a pull request that ignores this directory.

I believe you can also configure what gets excluded by configuring the :html_report_filter: regex (under :gcov: in the project.yml file).

mvandervoord commented 5 years ago

@tobyjwebb -- yes please! If you get something this week, I can even roll it into the upcoming release!