I have gradle(6.9) springboot(2.7.0) project with following dependecy
compileOnly 'org.projectlombok:lombok:1.18.22'
annotationProcessor 'org.projectlombok:lombok:1.18.22'
testCompileOnly 'org.projectlombok:lombok:1.18.22'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.22'
while analysis with sonar (version is 8.9) it shows Missing Ctor rule even if i had used @NoArgsConstructor it shows Class should define a constructor.The same error shows for entity class annotated with @Entity
I have tried to add the following in sonar-project.properties
sonar.java.libraries=build/resources/main/META-INF/resources/lombok.jar
and the following in build.gradle
property "sonar.java.libraries","build/resources/main/META-INF/resources/lombok-1.18.22.jar"
but not working.
given the following in the lombok.config
lombok.addLombokGeneratedAnnotation = true
it will helps only to improve the coverage of @NoArgsConstructor,@Getter etc
I found that .class file having the generated constructor but sonar is not analysing this properly.That sonar rule is from checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.MissingCtorCheck
I can't suppress this rule.expecting other solutions for this