Skip to content

Issue #13321: Kill mutation for SummaryJavaDocCheck-8#13318

Merged
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:s8
Jul 2, 2023
Merged

Issue #13321: Kill mutation for SummaryJavaDocCheck-8#13318
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:s8

Conversation

@Kevin222004
Copy link
Copy Markdown
Contributor

@Kevin222004 Kevin222004 commented Jun 26, 2023

Issue #13321: Kill mutation for SummaryJavaDocCheck-8


Check :-

https://checkstyle.org/checks/javadoc/summaryjavadoc.html#SummaryJavadoc


Mutation

<mutation unstable="false">
<sourceFile>SummaryJavadocCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.javadoc.SummaryJavadocCheck</mutatedClass>
<mutatedMethod>isPeriodNotAtEnd</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator</mutator>
<description>replaced call to java/lang/String::trim with receiver</description>
<lineContent>final String summarySentence = sentence.trim();</lineContent>
</mutation>


Explaination

isPeriodNotAtEnd is called only at

if (isPeriodNotAtEnd(summaryVisible, period)) {
log(inlineSummaryTag.getLineNumber(), MSG_SUMMARY_MISSING_PERIOD);
}

know in this method as a sentence summaryVisible is passed which we get from getVisibleContent

private static String getVisibleContent(String summary) {
final String visibleSummary = HTML_ELEMENTS.matcher(summary).replaceAll("");
return visibleSummary.trim();
}

which already return string with trim


Regression :-


Diff Regression config: https://gist.githubusercontent.com/Kevin222004/61eaa69fe98585b6ee1882ca082362bc/raw/316ca02ce9fd290119d9bfc560f2b11e84a1b685/Summary.xml
Diff Regression projects: https://gist.githubusercontent.com/Kevin222004/9600f179b602d4c971bdb0a050099005/raw/360a95ed7bb60d7a0956e531199d484c4d6f6617/test-projects.properties
Report label: new-Regression-2

@Kevin222004
Copy link
Copy Markdown
Contributor Author

Github, generate report

@github-actions
Copy link
Copy Markdown
Contributor

@Kevin222004 Kevin222004 changed the title Issue #13109: Kill mutation for SummaryJavaDocCheck-8 Issue #13321: Kill mutation for SummaryJavaDocCheck-8 Jun 28, 2023
@Kevin222004 Kevin222004 marked this pull request as ready for review June 28, 2023 13:27
@Kevin222004
Copy link
Copy Markdown
Contributor Author

Github, generate report

Copy link
Copy Markdown
Member

@romani romani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok to merge if reports are clean

@Kevin222004
Copy link
Copy Markdown
Contributor Author

failure not relates to changes

@github-actions
Copy link
Copy Markdown
Contributor

@Kevin222004
Copy link
Copy Markdown
Contributor Author

Github, generate report

@github-actions
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Member

@rdiachenko rdiachenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rdiachenko rdiachenko assigned Vyom-Yadav and unassigned rdiachenko Jun 29, 2023
Copy link
Copy Markdown
Member

@Vyom-Yadav Vyom-Yadav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Vyom-Yadav Vyom-Yadav assigned romani and unassigned Vyom-Yadav Jul 2, 2023
@romani
Copy link
Copy Markdown
Member

romani commented Jul 2, 2023

@Kevin222004 , pr is ready for merge, please fix conflict.

@Kevin222004
Copy link
Copy Markdown
Contributor Author

@romani done

@romani romani merged commit b8915da into checkstyle:master Jul 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants