Tarpaulin: Consider the ability to exclude somes files

Created on 27 Jul 2017  ·  3Comments  ·  Source: xd009642/tarpaulin

My project wayland-rs involves a large part of code-generation to generate message-passing APIs from XML specifications.

I see little point on exhaustively testing all this boilerplate, as in includes a _lot_ of redundant code, and my goal lies rather on testing the generator itself, rather than the code it produces. And as it easily represent more than 75% of the final code of the compiled crate, it clutters a lot the coverage report.

As such, I'd really like to be able to configure tarpaulin to ignore coverage result of source files coming from the ./target/ folder, for example, or any other approach that would allow me to ignore the coverage from files generated by the build script.

bug

Most helpful comment

I tried to use the git version of tarpaulin on my project, to see how big the impact is.

Coverage went from 16% to 60% ! That give a sens of how much of the code is generated.

Thanks again! 👍

All 3 comments

So one of my latest commits excludes any code in the target folder. This is because only generated code or code left as a result of Cargo.lock appear there and I don't feel any gain any benefit from being tested. Once the next version is published to crates.io you'll see this when you update.

I reckon the next release will probably be this weekend. Closing the issue as it's already resolved but I'll comment again to let you know when the next version is out if you'd like?

Thanks!

Don't worry about notifying me, I'll follow the new additions anyway and my CI is setup to automatically update tarpaulin. :)

I tried to use the git version of tarpaulin on my project, to see how big the impact is.

Coverage went from 16% to 60% ! That give a sens of how much of the code is generated.

Thanks again! 👍

Was this page helpful?
0 / 5 - 0 ratings