Issue #13809: Kill mutation in SuppressWithPlainTextCommentFilter#13888
Issue #13809: Kill mutation in SuppressWithPlainTextCommentFilter#13888romani merged 1 commit intocheckstyle:masterfrom
Conversation
| /** Suppression text.*/ | ||
| private final String text; | ||
| /** Suppression line.*/ | ||
| private final int lineNo; | ||
| /** Suppression column number.*/ | ||
| private final int columnNo; |
There was a problem hiding this comment.
I don't care about the mutation, but this will flaw the Suppression class and might introduce bugs in the future. Two mutations on the same line in different columns can now be possibly the same.
@romani @rdiachenko Please share your opinion on this.
There was a problem hiding this comment.
https://checkstyle.org/filters/suppresswithplaintextcommentfilter.html
Suppression is a line comment, usually.
In initial design we did not evy considered column based comments ( when off comment and on comment is on same line)
In our examples we never even tried to use suppression on/off comments to be granulated to columns.
We just try match a line where OFF comment and ON comment, all violations between will be suppressed.
We do use only lines:
private boolean isInScopeOfSuppression(AuditEvent event) {
return lineNo <= event.getLine();
}
There was a problem hiding this comment.
In that case, we can remove these fields. Resolved.
|
@Kevin222004 , please fix link check validation |
Vyom-Yadav
left a comment
There was a problem hiding this comment.
Please fix CI errors, lgtm!
|
rebased |
Issue #13809: Kill mutation in SuppressWithPlainTextCommentFilter
report:- https://kevin222004.github.io/PitestReport/com.puppycrawl.tools.checkstyle.filters/SuppressWithPlainTextCommentFilter.java.html
checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithPlainTextCommentFilter.java
Line 314 in b1b2510
checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/filters/SuppressWithPlainTextCommentFilter.java
Line 318 in b1b2510
I can see no usage of this both field outside of Suppression class or any such way that they are getting used so Removal will not cause any issue