mercredi 30 septembre 2015

Code generated by Lombok and Jacoco unit test coverage

I am using Lombok in several of our company projects and we are also running analysis using Sonarqube with Jacoco plugin to test the code quality and unit test coverage.

The problem is, that Sonarqube complains about low coverage in all of the classes using Lombok @Data annotation since the code generated by Lombok is not tested.

There is no point of testing the generated code (like equals, hashCode etc.) and I don't want to delombok the project just for sake of increasing the coverage.

Is there some easy way how to skip testing the Lombok generated code completely (for example some annotation specifying that the @Data annotation should not be applied)?

1 commentaire:

  1. Hello,
    I have the same issue. Did you find a way to get correct coverage without the delombok process ?

    Ty,
    Antoine

    RépondreSupprimer