Просмотр исходного кода

minor #6180 gitlab reporter - add fixed severity to match format (cbourreau)

This PR was merged into the master branch.

Discussion
----------

gitlab reporter - add fixed severity to match format

fix #6175

Following discussion here #1615, I created a simple fix.

Please tell me if I miss something.

Commits
-------

5286244d9 #1615 fix gitlab format by adding default severity
SpacePossum 3 лет назад
Родитель
Сommit
24999a07c3

+ 1 - 0
src/Console/Report/FixReport/GitlabReporter.php

@@ -43,6 +43,7 @@ final class GitlabReporter implements ReporterInterface
                 $report[] = [
                     'description' => $fixerName,
                     'fingerprint' => md5($fileName.$fixerName),
+                    'severity' => 'minor',
                     'location' => [
                         'path' => $fileName,
                         'lines' => [

+ 6 - 0
tests/Console/Report/FixReport/GitlabReporterTest.php

@@ -46,6 +46,7 @@ final class GitlabReporterTest extends AbstractReporterTestCase
             [{
                 "description": "some_fixer_name_here",
                 "fingerprint": "ad098ea6ea7a28dd85dfcdfc9e2bded0",
+                "severity": "minor",
                 "location": {
                     "path": "someFile.php",
                     "lines": {
@@ -67,6 +68,7 @@ JSON;
             [{
                 "description": "some_fixer_name_here_1",
                 "fingerprint": "b74e9385c8ae5b1f575c9c8226c7deff",
+                "severity": "minor",
                 "location": {
                     "path": "someFile.php",
                     "lines": {
@@ -76,6 +78,7 @@ JSON;
             },{
                 "description": "some_fixer_name_here_2",
                 "fingerprint": "acad4672140c737a83c18d1474d84074",
+                "severity": "minor",
                 "location": {
                     "path": "someFile.php",
                     "lines": {
@@ -97,6 +100,7 @@ JSON;
             [{
                 "description": "some_fixer_name_here_1",
                 "fingerprint": "b74e9385c8ae5b1f575c9c8226c7deff",
+                "severity": "minor",
                 "location": {
                     "path": "someFile.php",
                     "lines": {
@@ -106,6 +110,7 @@ JSON;
             },{
                 "description": "some_fixer_name_here_2",
                 "fingerprint": "acad4672140c737a83c18d1474d84074",
+                "severity": "minor",
                 "location": {
                     "path": "someFile.php",
                     "lines": {
@@ -115,6 +120,7 @@ JSON;
             },{
                 "description": "another_fixer_name_here",
                 "fingerprint": "30e86e533dac0f1b93bbc3a55c6908f8",
+                "severity": "minor",
                 "location": {
                     "path": "anotherFile.php",
                     "lines": {