Open ndench opened 2 years ago
Having the same issue on similar scenario.
@aurum86 could you please provide details about your case? What is the infection.json5
, how do you run infection (command line)?
I can't reproduce it. Mention escapeshellarg
has been removed a while ago, so probably @aurum86 you have different issue
We run infection only over a specific subset of the codebase which contains heavy business logic. This allows us to enforce a 100% MSI for critical code paths. We do this by using file glob patterns in the
directories
config section, eg.src/*/Core
.This was recently broken by #1697, specifically by adding the
directories
configuration togit diff
command withescapeshellarg
which results in thegit diff
command being changed to the following, which returns an empty list of changes.Is there any reason that we need
escapeshellarg
here? That's usually used to prevent untrusted data being executed, but it should only ever include data provided by the same user who is running the command right?Alternatively, maybe the
directories
config property could support regex likeexcludes
does?phpunit.xml
```xmlinfection.json.dist
```json { "timeout": 30, "source": { "directories": [ "src/Security", "src/*/Core", "src/*/Action", "src/Integrations/*/Action", "src/Integrations/*/Core", "src/*/Enum", ], "excludes": [ "Migrations" ] }, "testFrameworkOptions": "--testsuite=Unit", "mutators": { "@default": true, "IdenticalEqual" : false, "NotIdenticalNotEqual": false, "MBString": false }, "logs": { "text": "build\/infection\/log.txt", "debug": "build\/infection\/debug.txt", "summary": "build\/infection\/summary.txt" } } ```Output with issue
``` [OK] No files in diff found, skipping mutation analysis. ```