I am trying to suppress CheckStyle StrictDuplicateCode warning, and it does not work. In my Eclipse project, I have two classes with similar fields:
public class MyClass {
// CHECKSTYLE:OFF
private String field1;
private String field2;
private String field3;
private String field4;
private String field5;
private String field6;
private String field7;
private String field8;
}
public class MyDuplicateClass {
// CHECKSTYLE:OFF
private String field1;
private String field2;
private String field3;
private String field4;
private String field5;
private String field6;
private String field7;
private String field8;
}
Putting "CHECKSTYLE:OFF" comment in one or both classes does not suppress the warning. Am I missing something?
Make sure you configured the SuppressionCommentFilter correctly, for example: