Code quality report issue count does not match report

Summary

I've added a code quality report to my ci pipeline and the issue count does not match what's shown in the reports. The report file shows 17,880 issues but the UI shows "Found 13962 code quality issues".

I observed this behavior first when there were about 35,000 issues in the code quality report and the UI showed only about 27,000. I thought I had reached the max number of issues, but reducing the number of errors proved me wrong.

Steps to reproduce

  1. Configure a code quality report that has a high number of minor code quality issues
  2. Run the pipeline
  3. Verify results do not match

Example Project

What is the current bug behavior?

I see a number less than the actual number of issues.

What is the expected correct behavior?

I should see the same number of issues that is in my report json.

Relevant logs and/or screenshots

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes