Skip to content

Commit 2fb36ed

Browse files
committed
phplint xml merger
- Extension package for overtrue/phplint - merge multiple xml result files into one big - sum overall error and tests in testsuite node - sort all results bei TestClass in a testcase - sum errors by testcase
1 parent b126097 commit 2fb36ed

File tree

12 files changed

+3568
-0
lines changed

12 files changed

+3568
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/vendor/
2+
/.idea/

.phpunit.result.cache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
C:37:"PHPUnit\Runner\DefaultTestResultCache":462:{a:2:{s:7:"defects";a:3:{s:51:"PhpLintMerger\XmlMergeCommandTest::testRunXmlMerges";i:4;s:57:"PhpLintMerger\Tests\XmlMergeCommandTest::testRunXmlMerges";i:4;s:59:"PhpLintMerger\Command\XmlMergeCommandTest::testRunXmlMerges";i:6;}s:5:"times";a:3:{s:51:"PhpLintMerger\XmlMergeCommandTest::testRunXmlMerges";d:0.028;s:57:"PhpLintMerger\Tests\XmlMergeCommandTest::testRunXmlMerges";d:0.013;s:59:"PhpLintMerger\Command\XmlMergeCommandTest::testRunXmlMerges";d:0.044;}}}

bin/phplint-merger

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
$classLoaderFilepath = __DIR__ . '/../../../autoload.php';
5+
if (!file_exists($classLoaderFilepath)) {
6+
if (file_exists(__DIR__ . '/../.Build/vendor/autoload.php')) {
7+
$classLoaderFilepath = __DIR__ . '/../.Build/vendor/autoload.php';
8+
} else {
9+
fwrite(
10+
STDERR,
11+
'You need to set up the project dependencies using Composer:' . PHP_EOL . PHP_EOL .
12+
' composer install' . PHP_EOL . PHP_EOL .
13+
'You can learn all about Composer on https://getcomposer.org/.' . PHP_EOL
14+
);
15+
16+
die(1);
17+
}
18+
}
19+
20+
require $classLoaderFilepath;
21+
22+
$app = new \Symfony\Component\Console\Application('vansari/phplint-merger', '1.0');
23+
$app->addCommands(
24+
[
25+
new \PhpLintMerger\Command\XmlMergeCommand(),
26+
]
27+
);
28+
$app->run();

composer.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "vansari/phplint-merger",
3+
"description": "Simple XML Log Merger for overtrue/phplint xml reports",
4+
"type": "project",
5+
"license": "MIT",
6+
"authors": [
7+
{
8+
"name": "Kurt Junker",
9+
"email": "junker.kurt@gmail.com"
10+
}
11+
],
12+
"require": {
13+
"php": ">=7.3",
14+
"ext-dom": "*",
15+
"ext-json": "*",
16+
"ext-simplexml": "*",
17+
"symfony/console": "^5.2",
18+
"symfony/finder": "^5.2",
19+
"monolog/monolog": "^2.1"
20+
},
21+
"autoload": {
22+
"psr-4": {
23+
"PhpLintMerger\\": "src/PhpLintMerger/"
24+
}
25+
},
26+
"require-dev": {
27+
"phpunit/phpunit": "9.3.*",
28+
"phpspec/prophecy-phpunit": "^2.0"
29+
},
30+
"autoload-dev": {
31+
"psr-4": {
32+
"PhpLintMerger\\": "tests/PhpLintMerger/"
33+
}
34+
},
35+
"bin": [
36+
"bin/phplint-merger"
37+
]
38+
}

0 commit comments

Comments
 (0)