Update surefire/jacoco configuration to ignore Lombok generated code.
This morning, I accidentally found this article when searching for some Lombok documentation: https://www.rainerhahnekamp.com/en/ignoring-lombok-code-in-jacoco/
It seems that since we first started Quizzard in 2016, Jacoco (the tool we use to measure code coverage in Maven) has been updated to support detecting the lombok.@Generated
annotation to ignore code generated by Lombok. This could potentially change our code coverage and this problem was already discussed back in 2016 when setting up code coverage.
In this issue, we change the configuration of Maven, Surefire and Jacaco in such a way that Lombok generated code is not longer counted for code coverage.
-
Create the lombok.config
file to ensure Lombok generateslombok.@Generated
annotations. -
Update surefire configuration to include all source code except that from the tests themselves and the generated JOOQ code. -
Verify the new Jacaco code coverage percentages.
Edited by Remco de Man