On Wednesday, February 14, 2018 at 1:38:51 AM UTC+1, anila...@gmail.com wrote: > > Hi, > I am running Jacoco 0.8.0. Sonarqube Jacoco coverage report gives less > coverage (eg. Covered by unit tests (4 of 8 conditions) wherever I have > try-with-resources. I found JAVAC.TRYWITH filter. Not sure how to use the > filter. > > FYI, I am using jacoco-maven-plugin and Sonarqube 5.6.6 integrated with > Jacoco. Please help. >
Hi, Filters mentioned on this page and implemented in version 0.8.0 are unconditionally enabled, they do not affect exec file and take place during generation of report from exec file. What means following for tools that directly read exec file and generate their own reports from it (such as SonarQube): from changelog ( http://www.jacoco.org/jacoco/trunk/doc/changes.html ): Note: Tools that directly read exec files and embed JaCoCo for this (such > as SonarQube or Jenkins) will provide filtering functionality only after > they updated to this version of JaCoCo. from announcement of version 0.8.0 ( https://groups.google.com/d/msg/jacoco/e2PVMeMvA8k/uHsJbi4iAQAJ ) : *Please Note* > Tools that directly read exec files (which is not a final report) and > embed JaCoCo for generation of report will provide filtering functionality > only after they updated to this version of JaCoCo. > So please follow/wait/etc respective vendors such as > > - SonarQube - https://jira.sonarsource.com/browse/SONARJAVA-2608 > > So from the above ticked - in case of SonarQube you need SonarJava plugin version 5.1. -- 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 jacoco+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/591b7b5d-bec6-45dc-87ef-14fc6007385a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.