Lombok annotations prohibit EcclEmma from Working

Viewed 16

I don't have a specific code coverage metric for my project, but do want to make sure I exercise as much aspects of the code as possible. I'm also using Lombok and these annotations:

@Data
@EqualsAndHashCode
@AllArgsConstructor
@Builder

In Eclipse, when running my JUnit tests, it says methods got executed, but then there is no green in the source in the src/main/java code. Numerically, I can arguably quantify my code coverage but this isn't what I'm trying to do.

In non-Lombok classes, I don't see this problem. If a Junit calls methodA(), I see the relevant parts of methodA() colored green showing the lines of code being run. I believe the Lombok annotations internally generate source code that the EcclEmma tool cannot work with.

Are there any work-arounds?

Eclipse/Lombok Version Info:

Eclipse IDE for Enterprise Java and Web Developers (includes Incubating components)

Version: 2022-03 (4.23.0)
Build id: 20220310-1457

(c) Copyright Eclipse contributors and others 2000, 2022.  All rights reserved. Eclipse and the Eclipse logo are trademarks of the Eclipse Foundation, Inc., https://www.eclipse.org/. The Eclipse logo cannot be altered without Eclipses permission. Eclipse logos are provided for use under the Eclipse logo and trademark guidelines, https://www.eclipse.org/logotm/. Oracle and Java are trademarks or registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

This product includes software developed by other open source projects including the Apache Software Foundation, https://www.apache.org/.

Lombok v1.18.24 "Envious Ferret" is installed. https://projectlombok.org/

Btw, I realize there's about 3 people in the world still using Eclipse and not IntelliJ. When I've used IJ, it's not the same as Eclipse, even with the emulation. I'm hoping someone has an Eclipse+Lombok oriented answer.

0 Answers
Related