Skip to content

Issue #13109: Kill mutation for ImportOrderCheck#13231

Merged
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:IOC1
Jun 15, 2023
Merged

Issue #13109: Kill mutation for ImportOrderCheck#13231
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:IOC1

Conversation

@Kevin222004
Copy link
Copy Markdown
Contributor

Issue #13109: Kill mutation for ImportOrderCheck


check

https://checkstyle.org/config_imports.html#ImportOrder


mutation

<mutation unstable="false">
<sourceFile>ImportOrderCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.imports.ImportOrderCheck</mutatedClass>
<mutatedMethod>setOption</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator</mutator>
<description>replaced call to java/lang/String::trim with receiver</description>
<lineContent>option = ImportOrderOption.valueOf(optionStr.trim().toUpperCase(Locale.ENGLISH));</lineContent>
</mutation>


Explaintaion

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.

Items


package com.puppycrawl.tools.checkstyle.checks.imports.importorder;

import static java.lang.Math.*; // ok
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.

No ok comments please in new test inputs.
Remove all of them.
We are ok to keep only one if no violation is present.

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.

really sorry, i missed that while copy paste from other file :)

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, removed

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 romani merged commit 94a0d8c 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.

2 participants