Skip to content

Issue #13321: Kill mutation for SummaryJavaDocCheck-10#13323

Merged
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:s10
Jun 28, 2023
Merged

Issue #13321: Kill mutation for SummaryJavaDocCheck-10#13323
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:s10

Conversation

@Kevin222004
Copy link
Copy Markdown
Contributor

@Kevin222004 Kevin222004 commented Jun 27, 2023

Issue #13321: Kill mutation for SummaryJavaDocCheck-10


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>validateUntaggedSummary</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator</mutator>
<description>replaced call to java/lang/String::substring with receiver</description>
<lineContent>&amp;&amp; containsForbiddenFragment(firstSentence.substring(0, endOfSentence))) {</lineContent>
</mutation>
<mutation unstable="false">
<sourceFile>SummaryJavadocCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.javadoc.SummaryJavadocCheck</mutatedClass>
<mutatedMethod>validateUntaggedSummary</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator</mutator>
<description>removed call to java/lang/String::isEmpty</description>
<lineContent>else if (!period.isEmpty()) {</lineContent>
</mutation>
<mutation unstable="false">
<sourceFile>SummaryJavadocCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.javadoc.SummaryJavadocCheck</mutatedClass>
<mutatedMethod>validateUntaggedSummary</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF</mutator>
<description>removed conditional - replaced equality check with true</description>
<lineContent>else if (!period.isEmpty()) {</lineContent>
</mutation>


Explaination

Test added


Regression :-


Diff Regression config: https://gist.githubusercontent.com/Kevin222004/61eaa69fe98585b6ee1882ca082362bc/raw/316ca02ce9fd290119d9bfc560f2b11e84a1b685/Summary.xml
Diff Regression projects: https://gist.githubusercontent.com/Kevin222004/21e3934e85f802e2fbd48af06d122364/raw/604256badd733d8568064f371d55657c04b00dfd/test-projects-2.properties
Report label: Regression-1

</mutation>



Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

are this empty lines to avoid conflicts ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes

@Kevin222004 Kevin222004 force-pushed the s10 branch 2 times, most recently from 5504152 to 029dbfb Compare June 27, 2023 15:12
@Kevin222004 Kevin222004 marked this pull request as draft June 27, 2023 15:51
@Kevin222004 Kevin222004 force-pushed the s10 branch 2 times, most recently from 3dee722 to 2d456f0 Compare June 27, 2023 16:35
@Kevin222004 Kevin222004 marked this pull request as ready for review June 27, 2023 17:42
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.

Items

@romani
Copy link
Copy Markdown
Member

romani commented Jun 28, 2023

Please share diff report with empty period.
We need to make sure we keep report no violations on all projects in diff regression.

@Kevin222004
Copy link
Copy Markdown
Contributor Author

Github, generate report

@Kevin222004
Copy link
Copy Markdown
Contributor Author

failure not related 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

@romani
Copy link
Copy Markdown
Member

romani commented Jun 28, 2023

Conflict.
@Kevin222004 , please fix.

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

@romani romani merged commit 6f5d5aa into checkstyle:master Jun 28, 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.

2 participants