Task :jacocoTestCoverageVerification FAILED
[ant:jacocoReport] Rule violated for class MyClass.1: instructions covered ratio is 0.0000, but expected minimum is 0.0001
The issue is that I do not have class with name MyClass.1. The only class I have is MyClass.
Jacoco adds number after the class name. And in order to exclude the class I have to write something like this:
jacocoTestCoverageVerification {
violationRules {
rule {
element = 'CLASS'
excludes = [
'MyClass.1'
]
}
}
}
Could anyone help to solve the issue or at least explain the behaviour?
Thank you for your help. My class contains switch on enum. The same issue is fully described here (https://github.com/jacoco/jacoco/issues/660). Switching to "0.8.2-SNAPSHOT" solved the problem.
Regards,
Sergii