Skip to content

Issue #13109: Kill mutation for UnusedImportCheck#13229

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

Issue #13109: Kill mutation for UnusedImportCheck#13229
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:uic1

Conversation

@Kevin222004
Copy link
Copy Markdown
Contributor

@Kevin222004 Kevin222004 commented Jun 15, 2023

Issue #13109: Kill mutation for UnusedImportCheck


Check :
https://checkstyle.org/config_imports.html#UnusedImports


Mutation covered

<mutation unstable="false">
<sourceFile>UnusedImportsCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.imports.UnusedImportsCheck</mutatedClass>
<mutatedMethod>processJavadocTag</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.NakedReceiverMutator</mutator>
<description>replaced call to java/lang/String::trim with receiver</description>
<lineContent>final String identifier = tag.getFirstArg().trim();</lineContent>
</mutation>


Explaination

The trim function is basically used to remove the space from the starting and end of the string.
over here {@link JavadocTag} space needs to be removed before and after arg JavadocTag.
I have tried many ways to put space before and after but there I no case available where this function usage is coming it is already trimmed.
Regression also finds nothing


Regression

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

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


Diff Regression config: https://gist.githubusercontent.com/Kevin222004/27bfdb307fbeb7459ca132bcc5104c5b/raw/0d6a50d1d09d825a0947355e7ba1af3f80d94d74/UnusedImport.xml
Diff Regression projects: https://gist.githubusercontent.com/Kevin222004/9600f179b602d4c971bdb0a050099005/raw/360a95ed7bb60d7a0956e531199d484c4d6f6617/test-projects.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 marked this pull request as ready for review June 17, 2023 17:39
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 19, 2023

Please resolve conflict

@Kevin222004
Copy link
Copy Markdown
Contributor Author

@romani conflicts resolved

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 1315ab9 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