Skip to content

Issue #13501: Kill mutation for JavadocTagContinuationIndentationCheck2#13573

Merged
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:JavadocTagContinuationIndentationCheck2
Aug 23, 2023
Merged

Issue #13501: Kill mutation for JavadocTagContinuationIndentationCheck2#13573
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:JavadocTagContinuationIndentationCheck2

Conversation

@Kevin222004
Copy link
Copy Markdown
Contributor

@Kevin222004 Kevin222004 commented Aug 20, 2023

Issue #13501: Kill mutation for JavadocTagContinuationIndentationCheck2


Check

https://checkstyle.org/checks/javadoc/javadoctagcontinuationindentation.html#JavadocTagContinuationIndentation


Mutation

<mutation unstable="false">
<sourceFile>JavadocTagContinuationIndentationCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocTagContinuationIndentationCheck</mutatedClass>
<mutatedMethod>isInlineDescription</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator</mutator>
<description>replaced call to com/puppycrawl/tools/checkstyle/api/DetailNode::getParent with receiver</description>
<lineContent>DetailNode inlineTag = description.getParent();</lineContent>
</mutation>
<mutation unstable="false">
<sourceFile>JavadocTagContinuationIndentationCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocTagContinuationIndentationCheck</mutatedClass>
<mutatedMethod>isInlineDescription</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator</mutator>
<description>removed call to com/puppycrawl/tools/checkstyle/api/DetailNode::getParent</description>
<lineContent>inlineTag = inlineTag.getParent();</lineContent>
</mutation>
<mutation unstable="false">
<sourceFile>JavadocTagContinuationIndentationCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocTagContinuationIndentationCheck</mutatedClass>
<mutatedMethod>isViolation</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.RemoveConditionalMutator_EQUAL_IF</mutator>
<description>removed conditional - replaced equality check with true</description>
<lineContent>if (CommonUtil.isBlank(text)) {</lineContent>
</mutation>


Explaination

loop run 1 time more


Regression

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

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


Diff Regression config: https://gist.githubusercontent.com/Kevin222004/ec7b8b74e9e64a8a9f9c0014860b2016/raw/e392cb5c586eacde87601e6ef62098f95b8eba8f/JavadocTagContinuationIndentationCheck.xml
Diff Regression projects: https://gist.githubusercontent.com/Kevin222004/9600f179b602d4c971bdb0a050099005/raw/360a95ed7bb60d7a0956e531199d484c4d6f6617/test-projects.properties
Report label: Regression-2

@Kevin222004
Copy link
Copy Markdown
Contributor Author

Github, generate report

@romani
Copy link
Copy Markdown
Member

romani commented Aug 20, 2023

@Kevin222004 , basic CI is red

@github-actions
Copy link
Copy Markdown
Contributor

@romani romani force-pushed the JavadocTagContinuationIndentationCheck2 branch from b09decb to 8d03c9e Compare August 21, 2023 03:54
@romani
Copy link
Copy Markdown
Member

romani commented Aug 21, 2023

Rebased to fix CI failure on ok comment

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 Kevin222004 force-pushed the JavadocTagContinuationIndentationCheck2 branch from 8d03c9e to 6e50bb5 Compare August 21, 2023 15:45
@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 Aug 21, 2023

@Kevin222004 , conflict

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 Aug 21, 2023
@Kevin222004 Kevin222004 force-pushed the JavadocTagContinuationIndentationCheck2 branch from 6e50bb5 to 5a90b57 Compare August 22, 2023 03:43
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.

Item:

private static boolean isInlineDescription(DetailNode description) {
boolean isInline = false;
DetailNode inlineTag = description.getParent();
DetailNode inlineTag = description;
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.

@Kevin222004 Can you please also change the name to currentNode as it is not an inlineTag node in every iteration, so makes less sense.

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.

@Kevin222004 , please do.

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.

Done

@romani romani assigned romani and unassigned Vyom-Yadav Aug 22, 2023
@Kevin222004 Kevin222004 force-pushed the JavadocTagContinuationIndentationCheck2 branch from 5a90b57 to 3d825c7 Compare August 22, 2023 17:27
@romani romani merged commit d949464 into checkstyle:master Aug 23, 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