Issue #13501: Kill mutation for JavadocContentLocationCheck#13517
Merged
romani merged 1 commit intocheckstyle:masterfrom Aug 10, 2023
Merged
Issue #13501: Kill mutation for JavadocContentLocationCheck#13517romani merged 1 commit intocheckstyle:masterfrom
romani merged 1 commit intocheckstyle:masterfrom
Conversation
Contributor
Author
|
#13517 (comment) |
e824fc1 to
2e10363
Compare
61 tasks
Member
|
Please share reports, to let us start reviewing. |
Contributor
Author
|
Github, generate report |
Contributor
Contributor
Author
|
Github, generate report |
Contributor
rdiachenko
reviewed
Aug 8, 2023
src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocContentLocationCheck.java
Outdated
Show resolved
Hide resolved
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 JavadocContentLocationCheck
Check
https://checkstyle.org/checks/javadoc/javadoccontentlocation.html#JavadocContentLocation
Mutation
checkstyle/config/pitest-suppressions/pitest-javadoc-suppressions.xml
Lines 84 to 91 in 7e879f3
Explaintaion
checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocContentLocationCheck.java
Line 170 in 7e879f3
This line of code is mutated as
private JavadocContentLocationOption location;know this changes will not affect the check functionality becuase the current logic here in visitToken
checkstyle/src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/JavadocContentLocationCheck.java
Lines 211 to 218 in 7e879f3
here in if condition we check if option is
JavadocContentLocationOption.FIRST_LINEbut for default/JavadocContentLocationOption.SECOND_LINEwe don't have any condition so as result whether on line 170private JavadocContentLocationOption location = JavadocContentLocationOption.SECOND_LINE;it will not affect if we write it asprivate JavadocContentLocationOption location;.In my opinion this might not be the good design Thats why I have change the logic.
Regression
Report-1 :- https://checkstyle-diff-reports.s3.us-east-2.amazonaws.com/b5370b0_2023231911/reports/diff/index.html
Report-2 :-
Diff Regression config: https://gist.githubusercontent.com/Kevin222004/56384ed9cfdddef897ec082ec71ad650/raw/246172cbe8caeca3a236d319b014417f5770442e/JavadocContentLocation.xml
Diff Regression projects: https://gist.githubusercontent.com/Kevin222004/9600f179b602d4c971bdb0a050099005/raw/360a95ed7bb60d7a0956e531199d484c4d6f6617/test-projects.properties
Report label: Report-2