Hi, 

actually option 2 is the only one that works with the current release:
Annotate with one of the existing annotations @lombok.Generated or
@groovy.transform.Generated. If you define the annotations yourself make
sure the retention is CLASS. 

If future versions of JaCoCo may come with their own annotation (like
@ExcludeFromCodeCoverage) would a dependency on this JaCoCo annotations
work better for you? 

Cheers,
-marc 

On 2018-02-27 22:46, Сергей Капралов wrote:

> Good day.
> 
> I have a tool, which besides other things generates equals and hashCode 
> methods for classes (it's my own tool, which is not somehow related or 
> dependent on lombok or similar stuff). And my intention is to make somehow 
> these methods excluded from JaCoCo coverage reports. What options do I have 
> in JaCoCo latest version?
> 
> Investigating opportunities on subj, described in 
> https://github.com/jacoco/jacoco/wiki/FilteringOptions, I found out these 
> potential ways of solving the problem:
> 1. Acceptable way for me would be to annotate equals and hashCode with some 
> @ExcludeFromCodeCoverage and call it a day, but as I got it from 
> https://github.com/jacoco/jacoco/issues/14, feature perspectives looks quite 
> shady for me (or maybe I got it wrong?).
> 2. There is a dirty hacky way which works for me in 0.8.0 - to create a fake 
> annotation lombok.Generated in the project and annotate equals/hashCode with 
> it. But it is... well... dirty.
> ...
> Any other options? 
> 
> -- 
> 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/cb99baa8-8ff2-43a9-ac88-0bb2383ea73b%40googlegroups.com
>  [1].
> For more options, visit https://groups.google.com/d/optout.

  

Links:
------
[1]
https://groups.google.com/d/msgid/jacoco/cb99baa8-8ff2-43a9-ac88-0bb2383ea73b%40googlegroups.com?utm_medium=email&utm_source=footer

-- 
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/2fc6282574e3b5d69e4f2e4526f43a5b%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to