Skip to content

Issue #13109: Kill mutation for IllegalTypeCheck#13199

Merged
rdiachenko merged 1 commit intocheckstyle:masterfrom
Kevin222004:ITC1
Jun 15, 2023
Merged

Issue #13109: Kill mutation for IllegalTypeCheck#13199
rdiachenko merged 1 commit intocheckstyle:masterfrom
Kevin222004:ITC1

Conversation

@Kevin222004
Copy link
Copy Markdown
Contributor

Issue #13109: Kill mutation for IllegalTypeCheck


check

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


Mutation

<mutation unstable="false">
<sourceFile>IllegalTypeCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.IllegalTypeCheck</mutatedClass>
<mutatedMethod>setIllegalAbstractClassNameFormat</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.MemberVariableMutator</mutator>
<description>Removed assignment to member variable illegalAbstractClassNameFormat</description>
<lineContent>illegalAbstractClassNameFormat = pattern;</lineContent>
</mutation>
<mutation unstable="false">
<sourceFile>IllegalTypeCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.coding.IllegalTypeCheck</mutatedClass>
<mutatedMethod>visitToken</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator</mutator>
<description>removed call to java/lang/Object::toString</description>
<lineContent>throw new IllegalStateException(ast.toString());</lineContent>
</mutation>


Explaination

Test added :)

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

romani commented Jun 11, 2023

@Kevin222004 , please consider to make single PR to fix all NonVoidMethodCallMutator at visitToken in all Checks. It will be simple win, and we already know how to do this by template.

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!

@rdiachenko
Copy link
Copy Markdown
Member

@Kevin222004 please resolve a conflict

@Kevin222004
Copy link
Copy Markdown
Contributor Author

@rdiachenko done

@Kevin222004
Copy link
Copy Markdown
Contributor Author

@rdiachenko new conflict resolved again

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 34d94b9 into checkstyle:master Jun 15, 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