Skip to content

Ability to instrument only permitted classes #673

Closed
@LlamaLad7

Description

@LlamaLad7

What is your use-case and why do you need this feature?
In the Kotlin compiler, there are a lot of tests which consider all the fields of a generated class, e.g. here, and because they use classfile version 52 (Java 8), the coverage agent adds a field to the class which breaks the test:

Fail: lambda should only capture 's': [final java.lang.String A$f$1.$s, private static transient boolean[] A$f$1.__$hits$__]

Describe the solution you'd like
Ideally I would be able to whitelist the specific compiler classes I am interested in instead of having to blacklist the offending test classes.
Something like:

kover {
    currentProject {
        instrumentation {
            includedClasses.add("org.jetbrains.kotlin.fir.*")
        }
    }
}

to match the existing excludedClasses option.

Metadata

Metadata

Assignees

Labels

FeatureFeature request issue typeS: ready for releaseStatus: merged in the main branch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions