Issue #13501: Kill mutation for MissingJavadocMethodCheck2#13561
Issue #13501: Kill mutation for MissingJavadocMethodCheck2#13561romani merged 1 commit intocheckstyle:masterfrom
Conversation
|
All javadoc Checks that are not based on AST Will pass less strict review, as most of them very buggy, so extra regression is ok. So empty regression diff report is good enough. |
|
Github, generate report |
1 similar comment
|
Github, generate report |
| return (ast.getType() == TokenTypes.METHOD_DEF | ||
| || ast.getType() == TokenTypes.CTOR_DEF | ||
| || ast.getType() == TokenTypes.COMPACT_CTOR_DEF) | ||
| && (getMethodsNumberOfLine(ast) <= minLineCount | ||
| || AnnotationUtil.containsAnnotation(ast, allowedAnnotations)); | ||
| return getMethodsNumberOfLine(ast) <= minLineCount | ||
| || AnnotationUtil.containsAnnotation(ast, allowedAnnotations); |
There was a problem hiding this comment.
In this all the ast.getType == .. are use less because they are the only tokens which is accepted so any token is going to be one of them because this method is called by
I see TokenTypes.ANNOTATION_FIELD_DEF in the list of accepted tokens, maybe it is a filter for that. Please see https://stackoverflow.com/a/48729302/15412365 and verify the removal.
There was a problem hiding this comment.
Done.
Sorry for taking too quick a decision on this pr. I have made the decision with some simple annotations. instead of ANNOTATION_FIELD_DEF
5247e0c to
bbdd034
Compare
|
@Kevin222004 , please generate diff report to double prove that it is good. |
|
Github, generate report |
|
Github, generate report |
bbdd034 to
b0261cd
Compare
|
rebased |
Issue #13501: Kill mutation for MissingJavadocMethodCheck2
Check :-
https://checkstyle.org/checks/javadoc/missingjavadocmethod.html#MissingJavadocMethod
Mutation
checkstyle/config/pitest-suppressions/pitest-javadoc-suppressions.xml
Lines 660 to 694 in d2c985e
Explaination
checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/MissingJavadocMethodCheck.java
Lines 432 to 438 in d832cae
In this all the
ast.getType == ..are use less because they are the only tokens which is accepted so any token is going to be one of them because this method is called bycheckstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/MissingJavadocMethodCheck.java
Lines 418 to 423 in d832cae
in which the ast is not modified and this method is called by visitToken
checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/MissingJavadocMethodCheck.java
Lines 380 to 388 in d832cae
where ast is not changing.
Second
checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/MissingJavadocMethodCheck.java
Lines 468 to 476 in d832cae
exclude == nullis also useless it is accepting both null and not null if it is not null then we have condition of that in logical Operators that'sexclude == nullis uselessRegression
Report-1 :-
Report-2 :-
Diff Regression config: https://gist.githubusercontent.com/Kevin222004/e68ff3727846e014d16ab79850e397c9/raw/ed2a46a684de49b6e500e30c1e1a5f867c6c6695/MissingJavadocMethodCheck.xml
Diff Regression projects: https://gist.githubusercontent.com/Kevin222004/9600f179b602d4c971bdb0a050099005/raw/360a95ed7bb60d7a0956e531199d484c4d6f6617/test-projects.properties
Report label: Regression-1