Skip to content

Commit 72b54e8

Browse files
Fix exclude files via config (#54)
* Update test coverage file path and clean up .gitignore * Fix exclusion pattern merging in source file scanning
1 parent 79e5517 commit 72b54e8

File tree

6 files changed

+3701
-4
lines changed

6 files changed

+3701
-4
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@
1313
infection.log
1414
phive.phar
1515
phpcca.phar
16-
/*.xml

src/Business/Cognitive/CognitiveMetricsCollector.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,10 @@ private function isExcluded(string $classAndMethod): bool
200200
*/
201201
private function findSourceFiles(string $path, array $exclude = []): iterable
202202
{
203-
return $this->directoryScanner->scan([$path], ['^(?!.*\.php$).+'] + $exclude);
203+
return $this->directoryScanner->scan(
204+
[$path],
205+
array_merge(['^(?!.*\.php$).+'], $exclude)
206+
);
204207
}
205208

206209
/**

0 commit comments

Comments
 (0)