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:
Code Block |
---|
|
<sealightsJvmParams>
<sl.featuresData.ignoreAutoGeneratedMethods>true</sl.featuresData.ignoreAutoGeneratedMethods>
...
</sealightsJvmParams> |
Code Block |
---|
title | Gradle configuration |
---|
|
sealightsJvmParams=["sl.featuresData.ignoreAutoGeneratedMethods":"true"] |
...
haveĀ Lombok generate the needed annotations, by setting the flag lombok.addLombokGeneratedAnnotation
to true
in the Lombok configuration itself.
This can be done by updating the lombok.config
file with the following entry:
Code Block |
title |
---|
lombok. | configlombok.addLombokGeneratedAnnotation = true |
...
Related articles
Filter by label (Content by label) |
---|
showLabels | false |
---|
max | 5 |
---|
spaces | com.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@1422e |
---|
sort | modified |
---|
showSpace | false | sort | modified |
---|
reverse | true |
---|
type | page |
---|
cql | label in ( "tests" , "java" , "powermock" , "coverage" ) and type = "page" and space = "SUP" |
---|
labels | PowerMock Java Tests Coverage |
---|
|
...