https://kotlinlang.org logo
#code-coverage
Title
# code-coverage
l

Lukasz Kalnik

01/26/2023, 3:55 PM
Can kover be configured to exclude all generated classes under
build
directories?
👀 1
p

Pedro Alberto

01/26/2023, 3:59 PM
I don't think is taking that into account
l

Lukasz Kalnik

01/26/2023, 4:01 PM
Then how can I exclude e.g. the
*FragmentDirections
and
*FragmentArgs
classes?
This doesn't help:
Copy code
filters {
        classes {
            excludes.addAll(
                listOf(
                    "*Fragment",
                    "*Fragment\$*",
                    "*FragmentDirections",
                    "*FragmentArgs",
                    "*Activity",
                    "*Activity\$*",
                    "*BuildConfig",
                )
            )
        }
j

Javier

01/26/2023, 4:01 PM
are they not internal?
l

Lukasz Kalnik

01/26/2023, 4:02 PM
What do you mean by "internal"?
j

Javier

01/26/2023, 4:02 PM
I think that should work
l

Lukasz Kalnik

01/26/2023, 4:02 PM
This is the report I get
j

Javier

01/26/2023, 4:03 PM
check the rules maybe I am missing something
l

Lukasz Kalnik

01/26/2023, 4:03 PM
No, they are public
image.png
The weird thing is, my rules above seem to work for
Fragment
but not for
FragmentArgs
or
Directions
460 Views