Hi, In absence of *complete reproducer* including source file "MyClass.java" , one can only guess what is going on. Can you provide it?
Also why not look at HTML report? which shows names of classes and what is more important links them to the source files from which they were compiled. And my wild guess is that actual class name is "MyClass$1" and "$" somehow gets converted into "." (wrongly?) Usually such names are the names of synthetic classes generated by Java compiler - do you have "MyClass$1.class"? More about synthetic classes in https://github.com/jacoco/jacoco/issues/660 >From which you can see that next release of JaCoCo (0.8.2) will provide filter for synthetic classes - https://github.com/jacoco/jacoco/issues/668 So maybe you can also try unreleased version? repositories { maven { url "https://oss.sonatype.org/content/repositories/snapshots" } } jacoco { toolVersion = "0.8.2-SNAPSHOT" } Regards, Evgeny On Wednesday, August 8, 2018 at 9:42:00 AM UTC+2, [email protected] wrote: > > Hi, I use Gradle 4.9 and Jacoco plugin 0.8.0. When I run > jacocoTestCoverageVerification task and some of my classes violate the rule > I got the following message in the console: > > 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? > > -- You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/7ae36ec3-1a82-46bc-9e73-5bc5e6049feb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
