Skip to content

Issue #13109: Kill mutation for UnusedLocalVariableCheck 7#13150

Merged
rdiachenko merged 1 commit intocheckstyle:masterfrom
Kevin222004:ul7
Jun 12, 2023
Merged

Issue #13109: Kill mutation for UnusedLocalVariableCheck 7#13150
rdiachenko merged 1 commit intocheckstyle:masterfrom
Kevin222004:ul7

Conversation

@Kevin222004
Copy link
Copy Markdown
Contributor

@Kevin222004 Kevin222004 commented Jun 3, 2023

Issue #13109: Kill mutation for UnusedLocalVariableCheck 7


Checks

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


Mutation covered :-

<mutation unstable="false">
<sourceFile>UnusedLocalVariableCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.UnusedLocalVariableCheck</mutatedClass>
<mutatedMethod>isInsideLocalAnonInnerClass</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator</mutator>
<description>replaced call to com/puppycrawl/tools/checkstyle/api/DetailAST::getParent with receiver</description>
<lineContent>DetailAST parentAst = literalNewAst.getParent();</lineContent>
</mutation>


Explaination

Similar as #13149 (comment)


Diff Regression config: https://gist.githubusercontent.com/Kevin222004/0dbdfb487f8e9a050ed0e6356f1a35b4/raw/31f7927f400e11e4285e86fd086b373095227848/unusedLocal.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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 3, 2023

@Kevin222004
Copy link
Copy Markdown
Contributor Author

Github, generate report

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 4, 2023

@Kevin222004
Copy link
Copy Markdown
Contributor Author

Github, generate report

@Kevin222004 Kevin222004 marked this pull request as ready for review June 8, 2023 06:50
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jun 8, 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

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! Just one extra iteration as we for sure know that the direct parent of LITERAL_NEW is never a type declaration.

@Vyom-Yadav Vyom-Yadav assigned Vyom-Yadav and romani and unassigned Vyom-Yadav Jun 12, 2023
@romani romani assigned rdiachenko and unassigned romani Jun 12, 2023
@romani
Copy link
Copy Markdown
Member

romani commented Jun 12, 2023

@Vyom-Yadav , please assign PR to person that is not yet reviewed, to make it explicit who blocks PR.

@Vyom-Yadav
Copy link
Copy Markdown
Member

@Vyom-Yadav , please assign PR to person that is not yet reviewed, to make it explicit who blocks PR.

Oh, my bad, I was in the flow of assigning you to PRs, will take care from now onwards.

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 merged commit afba237 into checkstyle:master Jun 12, 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