Report coverage metrics even when there are no violations

26 views
Skip to first unread message

nes...@gmail.com

unread,
Sep 12, 2014, 6:14:15 AM9/12/14
to jac...@googlegroups.com
Hi everyone,

(This is related to the maven plugin).

Given a codebase where the current coverage is lower than a set goal, one has to deliberately set the limits too high when running the check goal in order to see the current coverage levels.

The other option, of course, is to check out the generated reports and read the values off of them.
With a multi module project, this could be somewhat tedious, and reporting the current coverage for each module directly in the maven outout could be useful.
What do you say to for instance implementing a "verbose" flag to the check goal?

As it happes, I've tried that out myself and could create a pull request with that functionality if you are interested.

Regards,

Håvard

Marc Hoffmann

unread,
Sep 12, 2014, 9:36:20 AM9/12/14
to jac...@googlegroups.com
Hi Håvard,

So basically you're asking that the check goal should print the actual values in any case? This should be easily doable, but for consistency should also be implemented for the Ant task.

Please open a feature request for it. Also feel free to add your implementation as a PR.

Cheers,
-marc
> --
> 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+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Håvard Nesvold

unread,
Sep 12, 2014, 11:05:01 AM9/12/14
to jac...@googlegroups.com
Marc,

Yeah,
Print them in any case (optionally toggled by a flag or something)
I cloned the jacoco project from github just now, but ran into an error in the org.jacoco.examples.test module while building:

/jacoco/org.jacoco.examples.test/target/it/build/src/test/java/org/jacoco/examples/parser/ExpressionParserTest.java:[52,8] error: cannot access ExpressionParser

Any clue what that is about? I ran a clean mvn clean install (jdk 1.7)

Regards,

Håvard





You received this message because you are subscribed to a topic in the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jacoco/6vO37CXnBTs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jacoco+un...@googlegroups.com.

Marc Hoffmann

unread,
Sep 12, 2014, 12:25:07 PM9/12/14
to jac...@googlegroups.com
Hi,

no idea what's going on here. Are you using Maven 3?

Another note regarding this feature: Rules can be configured on any entity, e.g. classes or methods. This might result in thousands of checks that print out results. Maybe for every rule the min/max value and the respective entity should be printed?

Cheers,
-marc

Håvard Nesvold

unread,
Sep 12, 2014, 12:39:51 PM9/12/14
to jac...@googlegroups.com
Marc,

That would be maven 3, yeah.

I see, but what if this would comprise a "verbose"-mode of the check feature, i.e. this would be useful in that it

A) reports progress (printing out lines for every check (with potential redundancy, agreed)

and

B) reporting the current coverage levels for the individual checks.

The feature would then of course have to be optional (and im guessing by default - off).

Regards,
Håvard

nes...@gmail.com

unread,
Sep 17, 2014, 2:21:45 AM9/17/14
to jac...@googlegroups.com, nes...@gmail.com
There seemed to be an issue with maven 3.2.2, switching to 3.2.3 helped.

Created a pull request for my suggested feature:
https://github.com/jacoco/jacoco/pull/237

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages