You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm sure that lombok itself is extensively tested. But I'm running coverage tools on my application which uses lombok extensively, and a lot of my classes are reporting coverage of 70% or so, even though every line of the code I wrote is covered (per Emma).
For instance, I frequently use @value mostly for the getters, constructor, and private final. I'm glad that equals, toString, & hashCode are there in case I need them, but I'm frequently not using them, much less testing them.
The simple answer is lots of boilerplate where I have a thing that runs all of the lombok functionality for a given class (I'd trust the tests on lombok itself to do the actual testing). But adding boilerplate due to lombok seems wrong.
My first thought is an annotation to be placed on a test class. Something like: @LombokTest(class=Foo.class) public class FooTest { /* some methods that test the code I wrote */ }
The annotation would investigate class Foo, see what lombok has added, then run those methods, thus letting my coverage report more or less reflect the coverage of my code). I'm sure that there are better ways, but this is what I came up with.
Again thank you for lombok. It makes my life distinctly easier.
The text was updated successfully, but these errors were encountered:
I'm afraid, there's no solution for tools working on class files (because of the retention of @javax.annotation.Generated and because of @lombok.Generated not used yet).
Interesting. So I'm late to an ongoing project. Googling around I only found this, and this (oddly enough googling on "lombok generated annotation" turns up a lot of false positives. Is there a discussion of when this is happening, and what we'll have to do to work with it?
I'm sure that lombok itself is extensively tested. But I'm running coverage tools on my application which uses lombok extensively, and a lot of my classes are reporting coverage of 70% or so, even though every line of the code I wrote is covered (per Emma).
For instance, I frequently use @value mostly for the getters, constructor, and private final. I'm glad that equals, toString, & hashCode are there in case I need them, but I'm frequently not using them, much less testing them.
The simple answer is lots of boilerplate where I have a thing that runs all of the lombok functionality for a given class (I'd trust the tests on lombok itself to do the actual testing). But adding boilerplate due to lombok seems wrong.
My first thought is an annotation to be placed on a test class. Something like:
@LombokTest(class=Foo.class) public class FooTest { /* some methods that test the code I wrote */ }
The annotation would investigate class Foo, see what lombok has added, then run those methods, thus letting my coverage report more or less reflect the coverage of my code). I'm sure that there are better ways, but this is what I came up with.
Again thank you for lombok. It makes my life distinctly easier.
The text was updated successfully, but these errors were encountered: