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:
- I am create branch
test-1with.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
-
Create new branch
test-2fromtest-1and change.gitlab-ci.yml->"description": "👋 there is a second 🐛($CI_COMMIT_SHA)",, then commit and push. -
Create PR from
test-2totest-1and don't see widget
Proposal
Can you added more information about your compare code quality?
Thanks for any answer.
Edited by James Heimbuck