Skip to content

Commit 23ab663

Browse files
committed
add explanatory comment
1 parent 9cea543 commit 23ab663

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Command/ErrorFormatter/GitlabErrorFormatter.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ public function formatErrors(AnalysisResult $analysisResult, Output $output): in
3232
foreach ($analysisResult->getFileSpecificErrors() as $fileSpecificError) {
3333
$error = [
3434
'description' => $fileSpecificError->getMessage(),
35+
// This field is intended to be shown in the GitLab code quality scan widget and mentioned in the GitLab docs.
36+
// However, due to a regression in GitLab, it is currently not shown - see https://gitlab.com/gitlab-org/gitlab/-/issues/578172.
37+
// There is no harm in having it here, and it allows users to work around the GitLab bug by post-processing the JSON file.
38+
// For example, they might prepend `check_name` to `description`, causing GitLab to show the error identifier as part of the message.
39+
// TODO: remove this comment once the GitLab bug is fixed
3540
'check_name' => $fileSpecificError->getIdentifier(),
3641
'fingerprint' => hash(
3742
'sha256',

0 commit comments

Comments
 (0)