Skip to content

Commit

Permalink
#1615 fix gitlab format by adding default severity
Browse files Browse the repository at this point in the history
  • Loading branch information
cbourreau committed Dec 15, 2021
1 parent 00096f0 commit 5286244
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Console/Report/FixReport/GitlabReporter.php
Expand Up @@ -43,6 +43,7 @@ public function generate(ReportSummary $reportSummary): string
$report[] = [
'description' => $fixerName,
'fingerprint' => md5($fileName.$fixerName),
'severity' => 'minor',
'location' => [
'path' => $fileName,
'lines' => [
Expand Down
6 changes: 6 additions & 0 deletions tests/Console/Report/FixReport/GitlabReporterTest.php
Expand Up @@ -46,6 +46,7 @@ protected function createSimpleReport(): string
[{
"description": "some_fixer_name_here",
"fingerprint": "ad098ea6ea7a28dd85dfcdfc9e2bded0",
"severity": "minor",
"location": {
"path": "someFile.php",
"lines": {
Expand All @@ -67,6 +68,7 @@ protected function createWithAppliedFixersReport(): string
[{
"description": "some_fixer_name_here_1",
"fingerprint": "b74e9385c8ae5b1f575c9c8226c7deff",
"severity": "minor",
"location": {
"path": "someFile.php",
"lines": {
Expand All @@ -76,6 +78,7 @@ protected function createWithAppliedFixersReport(): string
},{
"description": "some_fixer_name_here_2",
"fingerprint": "acad4672140c737a83c18d1474d84074",
"severity": "minor",
"location": {
"path": "someFile.php",
"lines": {
Expand All @@ -97,6 +100,7 @@ protected function createComplexReport(): string
[{
"description": "some_fixer_name_here_1",
"fingerprint": "b74e9385c8ae5b1f575c9c8226c7deff",
"severity": "minor",
"location": {
"path": "someFile.php",
"lines": {
Expand All @@ -106,6 +110,7 @@ protected function createComplexReport(): string
},{
"description": "some_fixer_name_here_2",
"fingerprint": "acad4672140c737a83c18d1474d84074",
"severity": "minor",
"location": {
"path": "someFile.php",
"lines": {
Expand All @@ -115,6 +120,7 @@ protected function createComplexReport(): string
},{
"description": "another_fixer_name_here",
"fingerprint": "30e86e533dac0f1b93bbc3a55c6908f8",
"severity": "minor",
"location": {
"path": "anotherFile.php",
"lines": {
Expand Down

0 comments on commit 5286244

Please sign in to comment.