From 16269b5e99e48f94c5efcd5f36214ed86ec8327a Mon Sep 17 00:00:00 2001 From: James Heimbuck Date: Tue, 23 Jun 2020 17:19:06 +0000 Subject: [PATCH 1/2] Add codeclimate.yml example --- .../project/merge_requests/code_quality.md | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/doc/user/project/merge_requests/code_quality.md b/doc/user/project/merge_requests/code_quality.md index c9abc30998c219..4eab9bcba5a0e1 100644 --- a/doc/user/project/merge_requests/code_quality.md +++ b/doc/user/project/merge_requests/code_quality.md @@ -233,6 +233,30 @@ configure job execution at runtime. For a list of available environment variables, see [Environment variables](https://gitlab.com/gitlab-org/ci-cd/codequality#environment-variables). +## Customizing the scan + +The Codeclimate engine that is being used can be customized by use of the codeclimate.yml file. When a codeclimate.yml file is present in the base of a project's directory the scanner will use the options from that file. For all the options of customization please reference the [engine documentation](https://docs.codeclimate.com/docs/advanced-configuration#default-checks). + +### Adding or removing a plugin for analysis + +To add an additional plugin to the scanner simply add a few lines to the codeclimate.yml file in the base of the project. + +```yaml +version: "2" +plugins: + sonar-java: + enabled: true +``` + +Any of the [default plugins](https://gitlab.com/gitlab-org/ci-cd/codequality/-/tree/master/codeclimate_defaults) can be disabled in the same way. + +```yaml +version: "2" +plugins: + golint: + enabled: false +``` + ## Implementing a custom tool It's possible to have a custom tool provide Code Quality reports in GitLab. To -- GitLab From c359a86802dc56a07d0d53ff4fcbbeedd4d9550c Mon Sep 17 00:00:00 2001 From: James Heimbuck Date: Tue, 23 Jun 2020 18:50:40 +0000 Subject: [PATCH 2/2] fix extra space --- doc/user/project/merge_requests/code_quality.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/user/project/merge_requests/code_quality.md b/doc/user/project/merge_requests/code_quality.md index 4eab9bcba5a0e1..c1187cedda5a3c 100644 --- a/doc/user/project/merge_requests/code_quality.md +++ b/doc/user/project/merge_requests/code_quality.md @@ -235,7 +235,7 @@ For a list of available environment variables, see ## Customizing the scan -The Codeclimate engine that is being used can be customized by use of the codeclimate.yml file. When a codeclimate.yml file is present in the base of a project's directory the scanner will use the options from that file. For all the options of customization please reference the [engine documentation](https://docs.codeclimate.com/docs/advanced-configuration#default-checks). +The Codeclimate engine that is being used can be customized by use of the codeclimate.yml file. When a codeclimate.yml file is present in the base of a project's directory the scanner will use the options from that file. For all the options of customization please reference the [engine documentation](https://docs.codeclimate.com/docs/advanced-configuration#default-checks). ### Adding or removing a plugin for analysis -- GitLab