Skip to content

Issue #13109: Kill mutation for NestedIfDepthCheck#13235

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

Issue #13109: Kill mutation for NestedIfDepthCheck#13235
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:NestedIf

Conversation

@Kevin222004
Copy link
Copy Markdown
Contributor

@Kevin222004 Kevin222004 commented Jun 16, 2023

Issue #13109: Kill mutation for NestedIfDepthCheck


Check :-

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


Mutation

<mutation unstable="false">
<sourceFile>NestedIfDepthCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.NestedIfDepthCheck</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/033e5f2_2023175528/reports/diff/index.html

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


Diff Regression config: https://gist.githubusercontent.com/Kevin222004/b79c1d6f36c0d6db4516ff0aa57b8aee/raw/6e708ea645d0a75bfde0bd2baaff2adbf01730e0/NestedIf.xml
Diff Regression projects: https://gist.githubusercontent.com/Kevin222004/9600f179b602d4c971bdb0a050099005/raw/360a95ed7bb60d7a0956e531199d484c4d6f6617/test-projects.properties
Report label: R1

@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

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

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

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
Copy link
Copy Markdown
Member

romani commented Jun 24, 2023

Conflict, resolve please

@Kevin222004
Copy link
Copy Markdown
Contributor Author

done

@romani romani merged commit aacd217 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