Hi Thomas,
unfortunately there is no "general knob” to exclude constructors in general.
As a workaround you can define an annotation with the local name “Generated”
and annotate your DI constructors. See our change log:
https://www.jacoco.org/jacoco/trunk/doc/changes.html
<https://www.jacoco.org/jacoco/trunk/doc/changes.html>
Regards,
-marc
> On 16. Jan 2019, at 18:04, [email protected] wrote:
>
> Hi all!
>
> I know ignoring private constructors is a hot topic and debate, but I was
> wondering if there is a general knob somewhere to just ignore all constructor
> coverage in Jacoco.
>
> My use case is poor-mans (TM) dependency injection. I have a lot of cascading
> private constructors that just build my dependencies, there is no testable
> code in those. In small modules with a few classes this "glue" code
> tremendously changes the instruction coverage I receive.
>
> I guess some kind of annotation to ignore elements would be fine as well -
> this way it would be explicit - but I noticed that
> https://github.com/jacoco/jacoco/issues/14 is long open.
>
> Any ideas?
>
> Thanks in advance,
> Thomas.
>
> --
> 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/262649cb-cc38-4bc0-b2e2-175e105a0c51%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
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/25A83525-68E0-42FD-9065-C72D5BEA3E61%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.