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

Resolve Switch case mutation for ParenPad #12327

Closed
Kevin222004 opened this issue Oct 22, 2022 · 5 comments
Closed

Resolve Switch case mutation for ParenPad #12327

Kevin222004 opened this issue Oct 22, 2022 · 5 comments

Comments

@Kevin222004
Copy link
Collaborator

Related to #7797

kill mutation

<mutation unstable="false">
<sourceFile>ParenPadCheck.java</sourceFile>
<mutatedClass>com.puppycrawl.tools.checkstyle.checks.whitespace.ParenPadCheck</mutatedClass>
<mutatedMethod>visitToken</mutatedMethod>
<mutator>org.pitest.mutationtest.engine.gregor.mutators.experimental.RemoveSwitchMutator_7</mutator>
<description>RemoveSwitch 7 mutation</description>
<lineContent>switch (ast.getType()) {</lineContent>
</mutation>

@Kevin222004
Copy link
Collaborator Author

@romani @rnveach when I am trying to generate the regression on my local it is giving the error like this, am i making any mistake to run command or it is something else

kevin@inspiron-15-5510:~/Desktop/check_style/checkstyle/contribution/checkstyle-tester$ groovy diff.groovy --localGitRepo /home/kevin/Desktop/check_style/checkstyle/checkstyle   --baseBranch master --patchBranch ParenPad2 --config /home/kevin/Desktop/check_style/checkstyle/confinff.xml   --listOfProjects projects-to-test-on.properties
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
/home/kevin/Desktop/check_style/checkstyle/contribution/checkstyle-tester/diff.groovy: 53: unable to resolve class CliBuilder
 @ line 53, column 15.
       def cli = new CliBuilder(usage:'groovy diff.groovy [options]', header: 'options:', width: cliOptionsDescLineLength)
                 ^

/home/kevin/Desktop/check_style/checkstyle/contribution/checkstyle-tester/diff.groovy: 650: unable to resolve class AntBuilder
 @ line 650, column 5.
       new AntBuilder().replace(
       ^

/home/kevin/Desktop/check_style/checkstyle/contribution/checkstyle-tester/diff.groovy: 658: unable to resolve class AntBuilder
 @ line 658, column 5.
       new AntBuilder().copy(todir: destination) {
       ^

/home/kevin/Desktop/check_style/checkstyle/contribution/checkstyle-tester/diff.groovy: 664: unable to resolve class AntBuilder
 @ line 664, column 5.
       new AntBuilder().move(todir: destination) {
       ^

/home/kevin/Desktop/check_style/checkstyle/contribution/checkstyle-tester/diff.groovy: 670: unable to resolve class AntBuilder
 @ line 670, column 5.
       new AntBuilder().delete(dir: dir, failonerror: false)
       ^

5 errors


@romani
Copy link
Member

romani commented Oct 22, 2022

It might be related to groovy version. Try to use same version as in CI.

@rnveach
Copy link
Member

rnveach commented Oct 22, 2022

@Kevin222004 https://github.com/checkstyle/contribution/tree/master/checkstyle-tester#setup
If you identify anything wrong or missing, update readme.
It currently says min version, but I guess it needs to be exact.

@romani
Copy link
Member

romani commented Oct 23, 2022

@Kevin222004 , how you resolved issue on your local?

@romani romani closed this as completed Oct 23, 2022
@romani romani added this to the 10.3.5 milestone Oct 23, 2022
@Kevin222004
Copy link
Collaborator Author

@Kevin222004 , how you resolved issue on your local?

It is caused because of version issue only. I have just change my groovy version as same as ci (2.4.8) and report has successfully generated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants