Skip to content

Issue #13809: kill mutation for JavadocPropertiesGenerator#13821

Merged
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:Common2
Oct 11, 2023
Merged

Issue #13809: kill mutation for JavadocPropertiesGenerator#13821
romani merged 1 commit intocheckstyle:masterfrom
Kevin222004:Common2

Conversation

@Kevin222004
Copy link
Copy Markdown
Contributor

@Kevin222004 Kevin222004 commented Oct 4, 2023

Issue #13809: kill mutation for JavadocPropertiesGenerator

Mutation

<mutation unstable="false">
<sourceFile>JavadocPropertiesGenerator.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.JavadocPropertiesGenerator</mutatedClass>
<mutatedMethod>getFirstJavadocSentence</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.NonVoidMethodCallMutator</mutator>
<description>removed call to com/puppycrawl/tools/checkstyle/api/DetailAST::getNextSibling</description>
<lineContent>child = child.getNextSibling()) {</lineContent>
</mutation>

Explaintaion

Test

@romani
Copy link
Copy Markdown
Member

romani commented Oct 4, 2023

This is internal class to generate one txt file.
If content of file is same, just apply mutation to make pitest happy.

We do not need to test this class much, it doesn't execute on unpredictable user code.

@Kevin222004
Copy link
Copy Markdown
Contributor Author

As per the exisiting test if we follow the mutation then it must be timeout but the mutation is surviving.

@Kevin222004 Kevin222004 marked this pull request as ready for review October 10, 2023 04:19
@romani
Copy link
Copy Markdown
Member

romani commented Oct 10, 2023

Tests are failing https://app.travis-ci.com/github/checkstyle/checkstyle/builds/266475895#L1555

@romani
Copy link
Copy Markdown
Member

romani commented Oct 10, 2023

this class is executed at

checkstyle/pom.xml

Lines 781 to 797 in d74f431

<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<phase>process-classes</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<classpathScope>compile</classpathScope>
<mainClass>com.puppycrawl.tools.checkstyle.JavadocPropertiesGenerator</mainClass>
<arguments>
<argument>
${project.build.sourceDirectory}/com/puppycrawl/tools/checkstyle/api/TokenTypes.java
</argument>
<argument>--destfile</argument>
<argument>
${project.build.outputDirectory}/com/puppycrawl/tools/checkstyle/api/tokentypes.properties

result file tokentypes.properties is not in git, so please show CLI prove that content of it is not changed.

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:

@Kevin222004 Kevin222004 force-pushed the Common2 branch 2 times, most recently from def3e80 to 44a57e5 Compare October 11, 2023 04:19
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

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

@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.

CI must be green

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 4ce6328 into checkstyle:master Oct 11, 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