gradle-cobertura-plugin
gradle-cobertura-plugin copied to clipboard
[Question] Ignore lombok annotations
Hi there,
Currently I'm using this awesome cobertura plugin, in the coverage results I have the lombok annotation @EqualsAndHashCode marked as un covered.
I have my cobertura task configured like this:
cobertura {
coverageIgnoreTrivial = true
coverageIgnoreMethodAnnotations = [ "lombok.EqualsAndHashCode" ]
}
But the marked still in my reports, do you have any idea how to skip the lombok annotations?
Thanks in advanced
I've never used Lombok before, and I'm not sure exactly what you're seeing. On the test I ran, the annotation itself was the thing that showed up as being uncovered.
I suspect that the problem lies somewhere in the fact that the coverageIgnoreMethodAnnotations
property is designed to ignore annotations on methods and the @EqualsAndHashCode
annotation appears to be a class annotation.
There is some discussion about this in https://github.com/rzwitserloot/lombok/issues/1014. It seems that the lombok team is aware of this, but I wasn't clear on if they had a solution, or how you'd need to configure lombok to use it, but it might make more sense to a lombok user.