summaryrefslogtreecommitdiff
path: root/doc/user/project/merge_requests/code_quality.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/user/project/merge_requests/code_quality.md')
-rw-r--r--doc/user/project/merge_requests/code_quality.md18
1 files changed, 9 insertions, 9 deletions
diff --git a/doc/user/project/merge_requests/code_quality.md b/doc/user/project/merge_requests/code_quality.md
index 55dc0bcc41a..42c2547a618 100644
--- a/doc/user/project/merge_requests/code_quality.md
+++ b/doc/user/project/merge_requests/code_quality.md
@@ -22,8 +22,7 @@ Code Quality:
[GitLab Code
Quality](https://gitlab.com/gitlab-org/ci-cd/codequality) project using [default Code Climate configurations](https://gitlab.com/gitlab-org/ci-cd/codequality/-/tree/master/codeclimate_defaults).
- Can make use of a [template](#example-configuration).
-- Is available with [Auto
- DevOps](../../../topics/autodevops/stages.md#auto-code-quality).
+- Is available by using [Auto Code Quality](../../../topics/autodevops/stages.md#auto-code-quality), provided by [Auto DevOps](../../../topics/autodevops/index.md).
- Can be extended through [Analysis Plugins](https://docs.codeclimate.com/docs/list-of-engines) or a [custom tool](#implementing-a-custom-tool).
## Code Quality Widget
@@ -90,7 +89,7 @@ scans your source code for code quality issues. The report is saved as a
that you can later download and analyze.
It's also possible to override the URL to the Code Quality image by
-setting the `CODE_QUALITY_IMAGE` variable. This is particularly useful if you want
+setting the `CODE_QUALITY_IMAGE` CI/CD variable. This is particularly useful if you want
to lock in a specific version of Code Quality, or use a fork of it:
```yaml
@@ -236,12 +235,12 @@ was chosen as an operational decision by the runner team, instead of exposing `d
### Disabling the code quality job
-The `code_quality` job doesn't run if the `$CODE_QUALITY_DISABLED` environment
-variable is present. Please refer to the environment variables [documentation](../../../ci/variables/README.md)
+The `code_quality` job doesn't run if the `$CODE_QUALITY_DISABLED` CI/CD variable
+is present. Please refer to the CI/CD variables [documentation](../../../ci/variables/README.md)
to learn more about how to define one.
-To disable the `code_quality` job, add `CODE_QUALITY_DISABLED` as a custom environment
-variable. This can be done:
+To disable the `code_quality` job, add `CODE_QUALITY_DISABLED` as a custom CI/CD variable.
+This can be done:
- For the whole project, [in the project settings](../../../ci/variables/README.md#create-a-custom-variable-in-the-ui)
or [CI/CD configuration](../../../ci/variables/README.md#create-a-custom-variable-in-the-ui).
@@ -268,7 +267,7 @@ code_quality:
- if: '$CI_COMMIT_TAG || $CI_COMMIT_BRANCH'
```
-If you are using merge request pipelines, your `rules` (or [`workflow: rules`](../../../ci/yaml/README.md#workflowrules))
+If you are using merge request pipelines, your `rules` (or [`workflow: rules`](../../../ci/yaml/README.md#workflow))
might look like this example:
```yaml
@@ -365,7 +364,7 @@ After the Code Quality job completes:
In [GitLab 13.6 and later](https://gitlab.com/gitlab-org/ci-cd/codequality/-/issues/10),
it is possible to generate an HTML report file by setting the `REPORT_FORMAT`
-variable to `html`. This is useful if you just want to view the report in a more
+CI/CD variable to `html`. This is useful if you just want to view the report in a more
human-readable format or to publish this artifact on GitLab Pages for even
easier reviewing.
@@ -509,6 +508,7 @@ This can be due to multiple reasons:
nothing is displayed.
- The [`artifacts:expire_in`](../../../ci/yaml/README.md#artifactsexpire_in) CI/CD
setting can cause the Code Quality artifact(s) to expire faster than desired.
+- The widgets use the pipeline of the latest commit to the target branch. If commits are made to the default branch that do not run the code quality job, this may cause the Merge Request widget to have no base report for comparison.
- If you use the [`REPORT_STDOUT` environment variable](https://gitlab.com/gitlab-org/ci-cd/codequality#environment-variables), no report file is generated and nothing displays in the merge request.
- Large `gl-code-quality-report.json` files (esp. >10 MB) are [known to prevent the report from being displayed](https://gitlab.com/gitlab-org/gitlab/-/issues/2737).
As a work-around, try removing [properties](https://github.com/codeclimate/platform/blob/master/spec/analyzers/SPEC.md#data-types)