-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jacoco not ignoring generated lombok @NonNull annotation in coverage reports #780
Comments
Your expectation is incorrect, since changelog clearly states that only methods annotated with Moreover the fact that |
@Godin I would go with the same argument we concluded with for Java |
I don't agree with this argument. Why do we use
We could use And why shouldn't we write a test for it? Because we write tests for use cases! The final argument is that Jacoco is a tool, not a TDD guard to tell us what to test and what not to test. I completely understand that this feature can be off by default, but definitely should be present for those who want to use it. The lack of this feature (+poor error report) is extremely annoying and the main reason why I dislike the tool. As a TDD practitioner, it brings very little benefit and forces me to write pointless tests. |
If you want to ignore the lombok.nonNull.exceptionType = JDK see the lombok documentation on Supported configuration keys. |
I fully agree with @jordanms. We do not use The other question is how to implement this. But I guess at least such issue should be acknowledged. |
The purpose of using Lombok is to avoid writing boilerplate code. Null checks in an API are boilerplate. |
This is a issue tracker. Please use our mailing list for general questions:
https://groups.google.com/forum/?fromgroups=#!forum/jacoco
Also check FAQ before opening an issue: http://www.jacoco.org/jacoco/trunk/doc/faq.html
Steps to reproduce
JaCoCo version: 0.8.2
Operating system: osx
Tool integration: Gradle, Lombok
Expected behaviour
We expect that including lombok.config with lombok.addLombokGeneratedAnnotation set to true would mean that all lombok annotations would be ignored in coverage reports.
Actual behaviour
When we use the lombok @nonnull annotation, Jacoco reports uncovered branches. We would prefer to keep a high coverage threshold without having to unit test @nonnull.
Attached is a zip that should demonstrate the issue.
lombok-coverage.zip
The text was updated successfully, but these errors were encountered: