Issue #13501: Kill mutation for JavadocTypeCheck3#13564
Merged
romani merged 1 commit intocheckstyle:masterfrom Aug 23, 2023
Merged
Issue #13501: Kill mutation for JavadocTypeCheck3#13564romani merged 1 commit intocheckstyle:masterfrom
romani merged 1 commit intocheckstyle:masterfrom
Conversation
Contributor
Author
|
Github, generate report |
Contributor
Contributor
Author
|
Github, generate report |
Contributor
6d4c16b to
0fa8d8b
Compare
Contributor
Author
|
Non ast based check |
61 tasks
Vyom-Yadav
suggested changes
Aug 22, 2023
|
|
||
| final boolean found = tags | ||
| .stream() | ||
| .filter(JavadocTag::isParamTag) |
Member
There was a problem hiding this comment.
We filter only params at .... so it is double check, not required.
Nope, it is not. At CheckUtil.getTypeParameterNames(ast); we only get the parameter names from the Method or class, etc. We don't check anything regarding Javadoc.
This mutation can be killed by:
/**
*
* @link <T>
*/
protected class InnerPublic2<T> // violation 'missing @param <T> tag.'
{
} If we remove .filter(JavadocTag::isParamTag) then it won't give a violation which is wrong. We just compare the first argument of the tag, it may or may not be the same as the value that @param is supposed to have.
@Kevin222004 Please add this test case.
0fa8d8b to
f8d3c25
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #13501: Kill mutation for JavadocTypeCheck3
Check
https://checkstyle.org/checks/javadoc/javadoctype.html#JavadocType
Mutation
checkstyle/config/pitest-suppressions/pitest-javadoc-suppressions.xml
Lines 579 to 586 in d2c985e
We filter only params at
checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocTypeCheck.java
Line 619 in 0fa8d8b
But test was added.
Regression :-
Report-1 :- https://checkstyle-diff-reports.s3.us-east-2.amazonaws.com/6d4c16b_2023215123/reports/diff/index.html
Report-2 :- https://checkstyle-diff-reports.s3.us-east-2.amazonaws.com/6d4c16b_2023234000/reports/diff/index.html
Diff Regression config: https://gist.githubusercontent.com/Kevin222004/e591a1cf82070108242c5569a7236a01/raw/9b17bf12fa20506af727bb7cae5c18b5b6dfe4ec/JavadocTypeCheck.xml
Diff Regression projects: https://gist.githubusercontent.com/Kevin222004/9600f179b602d4c971bdb0a050099005/raw/360a95ed7bb60d7a0956e531199d484c4d6f6617/test-projects.properties
Report label: Regression-2