Code quality report not appearing in Merge Request

I have setup GitLab CI for code quality check, but I don’t see the code quality report in the merge request page.

The CI pipeline is ending with

Uploading artifacts for successful job
 Uploading artifacts...
 gl-code-quality-report.json: found 1 matching files 
 Uploading artifacts to coordinator... ok            id=2730 responseStatus=201 Created token=9J21r8Ai
 Job succeeded

My GitLab/Gitlab Runner versions are

  • GitLab (Hint: /help): 12.9.2
  • Runner (Hint: /admin/runners): 12.9.0

Following is my .gitlab-ci.yml

  - template: Code-Quality.gitlab-ci.yml

Is there anything else that I should add to .gitlab-ci.yml for getting the code quality report in merge request page?

@JoyceBabu thanks for posting! You need to run the code quality job on your default branch so there is something the Merge Request widget can use for comparison against the target branch before the widget will show the difference between the two.

There is a walk through video in the documentation that may prove useful as an example.

-James - Product Manager GitLab

Thank you James. I have seen the video. My .gitlab-ci.yml is very similar to the one in the video. The file contains only the code quality job

  - template: Code-Quality.gitlab-ci.yml

  stage: test
    paths: [gl-code-quality-report.json]

The jobs are running on all branches.

The gl-code-quality-report.json is 14MB. I read somewhere that code quality report does not work when the report file size is large. What is the limit?

@JoyceBabu - We’ve had some reports of slow MergeRequest page performance when a large file is being compared against. You can track our research of that problem in this issue.

Are you able to see the full code quality report on the pipeline page for any of the branches?

Hello James,

I apologize for the late response.

The pipeline is running successfully on all branches including the master. I don’t see see the report anywhere.

Are there any log files that I can check to find out why it is not loading?

@JoyceBabu The console output of the code_quality job may have some hints about if the report uploaded. The pipeline page is where you will find the full code quality report if it is being uploaded from the runner successfully.


1 Like

The gl-code-quality-report.json file is being generated successfully. It contains about 5K issue. The file is 12MB in size (330K zipped).

@JoyceBabu I realize I didn’t ask which license you are on at the moment? The Code Quality MR Widget is currently available for Starter/Bronze or above licenses. The Testing team is working to bring the MR widget to Core in the next milestone and you can follow the progress of the issue here.

1 Like

Ah!. That is it. Sorry for the confusion.

@JoyceBabu - No problem! Keep an eye on that issue for progress and which release the change deploys with so you can start using that feature.