Skip to content

Commit 25cd586

Browse files
author
Martins Sipenko
committed
Added support for aboslute & relative paths to clover files
1 parent 6a602a9 commit 25cd586

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/CodeClimate/Bundle/TestReporterBundle/CoverageCollector.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ public function __construct($paths)
2323
$config->setSrcDir($rootDir);
2424
$this->setCloverPaths($paths);
2525
foreach ($this->getCloverPaths() as $path) {
26-
$config->addCloverXmlPath($rootDir . DIRECTORY_SEPARATOR . $path);
26+
if (file_exists($path)) {
27+
$config->addCloverXmlPath($path);
28+
} else {
29+
$config->addCloverXmlPath($rootDir . DIRECTORY_SEPARATOR . $path);
30+
}
2731
}
2832

2933
$this->api = new Jobs($config);

0 commit comments

Comments
 (0)