Skip to content

Issue #13109: Kill mutation for NestedForDepthCheck#13236

Merged
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:NestedForDepthCheck
Jun 24, 2023
Merged

Issue #13109: Kill mutation for NestedForDepthCheck#13236
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:NestedForDepthCheck

Conversation

@Kevin222004
Copy link
Copy Markdown
Contributor

@Kevin222004 Kevin222004 commented Jun 16, 2023

Issue #13109: Kill mutation for NestedForDepthCheck


Check :-

https://checkstyle.org/config_coding.html#NestedForDepth


Mutation

<mutation unstable="false">
<sourceFile>NestedForDepthCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.NestedForDepthCheck</mutatedClass>
<mutatedMethod>beginTree</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.MemberVariableMutator</mutator>
<description>Removed assignment to member variable depth</description>
<lineContent>depth = 0;</lineContent>
</mutation>


Explaination

All the values will increase by visit token and decrement by leave Token so I don't see we should require to reset the value using beginTree because at the end it will be reset by leaveToken
but lets see Regression


Regression

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

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


Diff Regression config: https://gist.githubusercontent.com/Kevin222004/d0dc40653198aa6eca1700004f0ca8c7/raw/93cb657f3fc7ee3fdfa84024513435ddacb6547c/NestedForDepthCheck.xml
Diff Regression projects: https://gist.githubusercontent.com/Kevin222004/21e3934e85f802e2fbd48af06d122364/raw/604256badd733d8568064f371d55657c04b00dfd/test-projects-2.properties
Report label: R2

@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

@Kevin222004 Kevin222004 force-pushed the NestedForDepthCheck branch from 1f65036 to 514e2df Compare June 18, 2023 18:14
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

@Kevin222004 Kevin222004 force-pushed the NestedForDepthCheck branch from 514e2df to bf7f78e Compare June 19, 2023 11:49
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 19, 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 Jun 23, 2023
@romani romani merged commit 7d78717 into checkstyle:master Jun 24, 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