Skip to content

Issue #13672: Kill mutation for JavadocMissingLeadingAsteriskCheck#13663

Merged
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:JavadocMissingLeadingAsteriskCheck
Sep 6, 2023
Merged

Issue #13672: Kill mutation for JavadocMissingLeadingAsteriskCheck#13663
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:JavadocMissingLeadingAsteriskCheck

Conversation

@Kevin222004
Copy link
Copy Markdown
Contributor

@Kevin222004 Kevin222004 commented Aug 29, 2023

Issue #13672: Kill mutation for JavadocMissingLeadingAsteriskCheck


Check :-

https://checkstyle.org/checks/javadoc/javadocmissingleadingasterisk.html


Mutation

<mutation unstable="false">
<sourceFile>JavadocMissingLeadingAsteriskCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMissingLeadingAsteriskCheck</mutatedClass>
<mutatedMethod>isLastLine</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF</mutator>
<description>removed conditional - replaced equality check with true</description>
<lineContent>if (detailNode.getType() == JavadocTokenTypes.TEXT</lineContent>
</mutation>


Exaplaination

I have tried various ways but whenever the asterisk is missing means the line is blank then that token is always a JavadocTokenTypes.TEXT


Regression:-

Report-1 :- https://checkstyle-diff-reports.s3.us-east-2.amazonaws.com/aaa4542_2023215322/reports/diff/index.html

Report-2 :- https://checkstyle-diff-reports.s3.us-east-2.amazonaws.com/aaa4542_2023082849/reports/diff/index.html


Diff Regression config: https://gist.githubusercontent.com/Kevin222004/a40a9f4ddbfed0d1fcb9ab6edf5ff597/raw/f8160ac02488ec6a3d342369b47aa51784e41ae8/JavadocMissingLeadingAsterisk.xml
Diff Regression projects: https://gist.githubusercontent.com/Kevin222004/21e3934e85f802e2fbd48af06d122364/raw/604256badd733d8568064f371d55657c04b00dfd/test-projects-2.properties
Report label: Regression-2

@Kevin222004
Copy link
Copy Markdown
Contributor Author

Github, generate report

@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 Sep 2, 2023

@Kevin222004 , do you ready to convert this from draft to ready for review ?

@Kevin222004 Kevin222004 changed the title Issue #13501: Kill mutation for JavadocMissingLeadingAsteriskCheck Issue #13672: Kill mutation for JavadocMissingLeadingAsteriskCheck Sep 2, 2023
@Kevin222004 Kevin222004 marked this pull request as ready for review September 2, 2023 15:41
@Kevin222004 Kevin222004 force-pushed the JavadocMissingLeadingAsteriskCheck branch from aaa4542 to 33d57a1 Compare September 2, 2023 15:42
@romani
Copy link
Copy Markdown
Member

romani commented Sep 2, 2023

Spelling is failing in all PRs, ignore it for some time

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!

I checked with a couple of test cases. Only WS and TEXT can be empty, afaik. We skip WS nodes so only TEXT remains and the condition CommonUtil.isBlank(detailNode.getText()) can only be true for it.

@Vyom-Yadav Vyom-Yadav assigned romani and unassigned Vyom-Yadav Sep 5, 2023
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 assigned rdiachenko and unassigned romani Sep 6, 2023
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 force-pushed the JavadocMissingLeadingAsteriskCheck branch from 33d57a1 to 5fab89a Compare September 6, 2023 19:03
@rdiachenko
Copy link
Copy Markdown
Member

rebased

@rdiachenko rdiachenko assigned romani and unassigned rdiachenko Sep 6, 2023
@romani romani merged commit ba9710d into checkstyle:master Sep 6, 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