-
When am giving @NoArgsConstructor to a service class this shows the 'Missing Ctor ' rule . found that lombok genereated the constructor for the class by decoding the class files. here is the sample code @NoArgsConstructor
@Service
public class ReceiveMessageJsonHandler
{
private static final String SAND = "sand";
} I have gradle(6.9) ,open jdk 13 ,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' I can't suppress this rule.expecting other solutions for this because there is no violation of the rule actually the constructor is generated the issue due to the avoiding of @generated code in the class file. The rule details given below |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Lombok is part of https://checkstyle.org/writingchecks.html#Limitations and cannot be supported by Checkstyle. Instead of suppressing the entire rule, I recommend suppressing either this file for the check or using xpath to find a way to suppress lombok classes. |
Beta Was this translation helpful? Give feedback.
Lombok is part of https://checkstyle.org/writingchecks.html#Limitations and cannot be supported by Checkstyle.
Instead of suppressing the entire rule, I recommend suppressing either this file for the check or using xpath to find a way to suppress lombok classes.
https://checkstyle.org/filters/suppressionfilter.html
https://checkstyle.org/filters/suppressionxpathfilter.html