Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitlab reporter - add fixed severity to match format #6180

Merged
merged 1 commit into from Dec 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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