I'm trying to ignore lombok annotations in my Java project when using the code coverage tool "Sonarqube", I researched a lot about this and I ended adding this property to the "lombok.config" file:
lombok.addLombokGeneratedAnnotation = true
But when I execute "mvn test" or the "Run with coverage" option in IntelliJ I got this error in the console:
Unknown key 'lombok.addLombokGeneratedAnnotation' (C:\Projects\...\lombok.config:3)
And of course the generated coverage test still isn't ignore the lombok annotations, I'm using 0.8.1 version of Jacoco and 1.16.2 version of lombok.
Any idea how to make this work?
Lombok javadoc says
NB: As of v1.16.2 which introduces this annotation, lombok doesn't actually add this annotation; we're setting it up so that lombok jars in widespread use start having this, which will make it easier to actually apply it later on.
So try to update your lombok version. I have 1.18.2 and it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With