Problem
When working with Lombok, SeaLights reports quality risks on its generated code
Solution
SeaLights has the ability to ignore Lombok code if Lombok annotations are added to the generated code.
In order to do so, you need to do the following:
Set the sl.featuresData.ignoreAutoGeneratedMethods flag for our build scanner to ignore generated code.
For example:Maven configuration<sealightsJvmParams> <sl.featuresData.ignoreAutoGeneratedMethods>true</sl.featuresData.ignoreAutoGeneratedMethods> ... </sealightsJvmParams>
Gradle configurationsealightsJvmParams=["sl.featuresData.ignoreAutoGeneratedMethods":"true"]
- Have Lombok to generate the needed annotations, by setting the flag lombok.addLombokGeneratedAnnotation to true.
This can be done by updating the lombok.config file with the following entry:
lombok.config
lombok.addLombokGeneratedAnnotation = true
See https://projectlombok.org/features/configuration for more details
Related articles