Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Problem

When working with Lombok, SeaLights reports quality risks on its generated code

Solution

By default, SeaLights ignores SeaLights has the ability to ignore Lombok code if Lombok annotations are added to the generated code.
In order to get Lombok to generate these annotations, to do so, you need to do the following:

  1. Set the sl.featuresData.ignoreAutoGeneratedMethods flag forĀ our build scanner to ignore generated code.
    For example:

    Code Block
    titleMaven configuration
    <sealightsJvmParams>
        <sl.featuresData.ignoreAutoGeneratedMethods>true</sl.featuresData.ignoreAutoGeneratedMethods>
        ...
    </sealightsJvmParams>


    Code Block
    titleGradle configuration
    sealightsJvmParams=["sl.featuresData.ignoreAutoGeneratedMethods":"true"]


  2. HaveĀ Lombok to generate the needed annotations, by setting the flag lombok.addLombokGeneratedAnnotation

...

  1. to true.
    This can be done

...

  1. by updating the lombok.config file with the following entry:
Code Block
titlelombok.config
lombok.addLombokGeneratedAnnotation = true

...