Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #13809: kill mutation for JavadocPropertiesGenerator #13821

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

Kevin222004
Copy link
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
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
Contributor Author

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

@romani
Copy link
Member

romani commented Oct 10, 2023

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

@romani
Copy link
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
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
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
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
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
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
112 checks passed
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.

None yet

2 participants