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

Cannot exclude file in config #1000

Open
tanyagorn opened this issue Oct 29, 2021 · 1 comment
Open

Cannot exclude file in config #1000

tanyagorn opened this issue Oct 29, 2021 · 1 comment

Comments

@tanyagorn
Copy link

Summary

I got error during running stryker version 0.14.0, and it mentioned I need to exclude files in stryker.conf. However, after I've excluded files that cause error and run Stryker again. It still gives me the same error telling me to exclude the exact same files. Seem like this new version cannot exclude any files at all.

[error] (stryker) stryker4s.extension.exception.UnableToFixCompilerErrorsException: Unable to remove non-compiling mutants in the mutated files. As a work-around you can exclude them in the stryker.conf. Please report this issue at https://github.com/stryker-mutator/stryker4s/issues
[error] src/main/scala/com/abc/impl/AbstractRuleFrameworkProcessor.scala: 'object ws is not a member of package javax.xml'
[error] src/main/scala/com/abc/impl/AbstractRuleFrameworkProcessor.scala: 'not found: type WebServiceException'
[error] src/main/scala/com/abc/impl/AbstractRuleFrameworkProcessor.scala: 'not found: type WebServiceException'
[error] src/main/scala/com/abc/service/CreditCardBlackListService.scala 'object ws is not a member of package javax.xml'
[error] src/main/scala/com/abc/service/CreditCardBlackListService.scala: 'not found: type WebServiceException'
[error] src/main/scala/com/abc/service/CreditCardBlackListService.scala: 'not found: type WebServiceException'
[error] src/main/scala/com/abc/service/CreditCardBlackListService.scala: 'not found: type WebServiceException'
[error] src/main/scala/com/abc/service/RuleFrameworkService.scala: 'object ws is not a member of package javax.xml'
[error] src/main/scala/com/abc/service/RuleFrameworkService.scala: 'not found: type WebServiceException'

Stryker4s config

stryker4s {
     scala-dialect: "2.12"
     base-dir: "service"
     reporters: ["console", "html", "json"]
     excluded-mutations: ["StringLiteral"]
     mutate: [
         "src/main/scala/**/*.scala"
         "!src/main/scala/com/abc/impl/AbstractRuleFrameworkProcessor.scala",
         "!src/main/scala/com/abc/service/CreditCardBlackListService.scala",
         "!src/main/scala/com/abc/service/RuleFrameworkService.scala"
     ]
     concurrency: 4
 }

Stryker4s environment

stryker4s 0.14.0

Your Environment

software version(s)
Scala version 2.12
Build tool & version Intellij Idea community 2021.1.3 (community edition)
Operating System macOS
@Martin456
Copy link

Hello,
I encountered the same issue today and I solved it by switching order to have the exclusion before wildcard inclusion.

     mutate: [
         "!src/main/scala/com/abc/impl/AbstractRuleFrameworkProcessor.scala",
         "!src/main/scala/com/abc/service/CreditCardBlackListService.scala",
         "!src/main/scala/com/abc/service/RuleFrameworkService.scala",
         "src/main/scala/**/*.scala"
     ]

Hope it might help ;-)

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

No branches or pull requests

2 participants