Closed WildOrangutan closed 5 months ago
Hi,
should only exclude classes from code coverage, that can be excluded with 100% certainty.
Unfortunately, we cannot be 100% sure that all other classes should be excluded in all projects.
Somewhere, user classes can be named with the Activity
postfix, nothing will prevent the user from creating a package named databinding
.
That is why the documentation for the function indicates which classes it excludes from the report. It covers case for most of the user, but it cannot be applied to absolutely everyone, so for your project it is necessary to specify filters that are suitable only for you.
If this function will causes misunderstanding among other users, then it would be better to remove it.
I will close the task, because it is even more dangerous to change its behavior.
Describe the bug My company has a naming convention, that we add
Fragment
to all fragment classes. UsingandroidGeneratedClasses()
can exclude fragments, if you're naming fragment classes likeLoginFragment.kt
, since it uses a filterclasses(*Fragment)
.I know this is maybe very debatable, but I think that
androidGeneratedClasses()
should only exclude classes from code coverage, that can be excluded with 100% certainty.Reproducer
Environment