Skip to content

Issue #13109: Kill mutation for RegexpHeaderCheck#13261

Merged
rdiachenko merged 1 commit intocheckstyle:masterfrom
Kevin222004:ABC1
Jun 26, 2023
Merged

Issue #13109: Kill mutation for RegexpHeaderCheck#13261
rdiachenko merged 1 commit intocheckstyle:masterfrom
Kevin222004:ABC1

Conversation

@Kevin222004
Copy link
Copy Markdown
Contributor

@Kevin222004 Kevin222004 commented Jun 19, 2023

Issue #13109: Kill mutation for RegexpHeaderCheck


Check :-

https://checkstyle.org/config_header.html#RegexpHeader


Mutation

<mutation unstable="false">
<sourceFile>RegexpHeaderCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.header.RegexpHeaderCheck</mutatedClass>
<mutatedMethod>postProcessHeaderLines</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator</mutator>
<description>removed call to java/util/List::size</description>
<lineContent>+ (headerRegexps.size() + 1)</lineContent>
</mutation>
<mutation unstable="false">
<sourceFile>RegexpHeaderCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.header.RegexpHeaderCheck</mutatedClass>
<mutatedMethod>postProcessHeaderLines</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator</mutator>
<description>removed call to java/util/List::add</description>
<lineContent>headerRegexps.add(BLANK_LINE);</lineContent>
</mutation>


Explaination

Test added

}

@Test
public void testHeaderWithInvalidRegexp2() throws Exception {
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.

It is almost the same as testHeaderWithInvalidRegexp() with the difference in the input file. If you keep existing test and just update its input and expected exception message, would that be enough, so we don't need testHeaderWithInvalidRegexp2()?

Copy link
Copy Markdown
Contributor Author

@Kevin222004 Kevin222004 Jun 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes That's enough, I have updated

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.

Semaphore is failing in lots of pr

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.

Yes, let's not be blocked by semaphore.

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 requested a review from Vyom-Yadav June 23, 2023 02:08
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!

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 7e1dd4a into checkstyle:master Jun 26, 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