Code Quality missing example

Problem to solve

I can't testing code quality widget before add to production flow.

It's fairly confusing on how code quality should be set up for modern (12.x) versions of Gitlab. For example:

  • Is the produced filename important anymore? The docs suggest the name was meaningful in older versions, but do not indicate how modern versions determine which file to pull this report from.
  • Is the job name significant?
  • How do I troubleshoot Gitlab not recognizing a codequality file?

Further details

I added code quality tools to project, and try to "summon" widget.

Here is my steps:

  1. I am create branch test-1 with .gitlab-ci.yml, then commit and push
stages:
  - code-quality

code_quality:
  stage: code-quality
  artifacts:
    reports:
      codequality: gl-code-quality-report.json
  script: |
    cat >> gl-code-quality-report.json <<EOL
    [
      {
        "description": "👋 there is a first 🐛($CI_COMMIT_SHA)",
        "fingerprint": "$CI_COMMIT_SHA",
        "location": {
          "path": "lib/index.js",
          "lines": {
            "begin": 42
          }
        }
      }
    ]
    EOL
  1. Create new branch test-2 from test-1 and change .gitlab-ci.yml -> "description": "👋 there is a second 🐛($CI_COMMIT_SHA)",, then commit and push.

  2. Create PR from test-2 to test-1 and don't see widget

Proposal

Can you added more information about your compare code quality?

Thanks for any answer.

Edited Dec 03, 2019 by James Heimbuck
Assignee Loading
Time tracking Loading