kotlinx-kover icon indicating copy to clipboard operation
kotlinx-kover copied to clipboard

Exclude classes by path

Open friscoMad opened this issue 6 months ago • 1 comments

What is your use-case and why do you need this feature?

We would like to exclude all generated sources from the coverage report/verify rules, we are using dagger that adds some annotations but they don't have BINARY or RUNTIME retention. Source set exclusion does not work for us as Kapt generated sources are included in the main source set. We could use class inheritance to filter some (maybe all) generated classes but it is not working and even when working it adds a time penalty. Adding a feature to exclude from reports/verification based on source path can help excluding all autogenerated classes that are stored in the build directory in gradle it should be efficient and work with most of the code generation tools as they tend to store the generated classes in a different path.

Describe the solution you'd like Add another option to exclude (maybe include) classes by file path, perhaps an exclude dir option or something similar.

friscoMad avatar Aug 20 '24 11:08 friscoMad