From 5286244d992f4644e00f95e751d61674178b0594 Mon Sep 17 00:00:00 2001 From: cbourreau Date: Wed, 15 Dec 2021 12:17:00 +0100 Subject: [PATCH] #1615 fix gitlab format by adding default severity --- src/Console/Report/FixReport/GitlabReporter.php | 1 + tests/Console/Report/FixReport/GitlabReporterTest.php | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/Console/Report/FixReport/GitlabReporter.php b/src/Console/Report/FixReport/GitlabReporter.php index f78f428e5ee..974d66d1190 100644 --- a/src/Console/Report/FixReport/GitlabReporter.php +++ b/src/Console/Report/FixReport/GitlabReporter.php @@ -43,6 +43,7 @@ public function generate(ReportSummary $reportSummary): string $report[] = [ 'description' => $fixerName, 'fingerprint' => md5($fileName.$fixerName), + 'severity' => 'minor', 'location' => [ 'path' => $fileName, 'lines' => [ diff --git a/tests/Console/Report/FixReport/GitlabReporterTest.php b/tests/Console/Report/FixReport/GitlabReporterTest.php index 7030cc1f743..5c8c074d224 100644 --- a/tests/Console/Report/FixReport/GitlabReporterTest.php +++ b/tests/Console/Report/FixReport/GitlabReporterTest.php @@ -46,6 +46,7 @@ protected function createSimpleReport(): string [{ "description": "some_fixer_name_here", "fingerprint": "ad098ea6ea7a28dd85dfcdfc9e2bded0", + "severity": "minor", "location": { "path": "someFile.php", "lines": { @@ -67,6 +68,7 @@ protected function createWithAppliedFixersReport(): string [{ "description": "some_fixer_name_here_1", "fingerprint": "b74e9385c8ae5b1f575c9c8226c7deff", + "severity": "minor", "location": { "path": "someFile.php", "lines": { @@ -76,6 +78,7 @@ protected function createWithAppliedFixersReport(): string },{ "description": "some_fixer_name_here_2", "fingerprint": "acad4672140c737a83c18d1474d84074", + "severity": "minor", "location": { "path": "someFile.php", "lines": { @@ -97,6 +100,7 @@ protected function createComplexReport(): string [{ "description": "some_fixer_name_here_1", "fingerprint": "b74e9385c8ae5b1f575c9c8226c7deff", + "severity": "minor", "location": { "path": "someFile.php", "lines": { @@ -106,6 +110,7 @@ protected function createComplexReport(): string },{ "description": "some_fixer_name_here_2", "fingerprint": "acad4672140c737a83c18d1474d84074", + "severity": "minor", "location": { "path": "someFile.php", "lines": { @@ -115,6 +120,7 @@ protected function createComplexReport(): string },{ "description": "another_fixer_name_here", "fingerprint": "30e86e533dac0f1b93bbc3a55c6908f8", + "severity": "minor", "location": { "path": "anotherFile.php", "lines": {