I have the following code which uses lombok @Value
for generating a immutable class:
@Value
public class InputDTO {
String field;
}
but unfortunately it doesn't agree with checkstyle visibility modifier checks which complains with this error:
Variable 'field' must be private and have accessor methods. (18:10) [VisibilityModifier]
I have found a workaround suppressing the check like this:
@SuppressWarnings("checkstyle:VisibilityModifier")
But is there a way to make checkstyle validate lombok's generated code rather than the plain original code?