Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9fd035a1
Commit
9fd035a1
authored
May 30, 2017
by
Achilleas Pipinellis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Copyedit code quality diff docs
parent
3ad517cc
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
19 deletions
+32
-19
doc/ci/examples/code_climate.md
doc/ci/examples/code_climate.md
+9
-3
doc/user/project/merge_requests/code_quality_diff.md
doc/user/project/merge_requests/code_quality_diff.md
+16
-12
doc/user/project/merge_requests/index.md
doc/user/project/merge_requests/index.md
+7
-4
No files found.
doc/ci/examples/code_climate.md
View file @
9fd035a1
# Analyze project code quality with Code Climate CLI
This example shows how to run
[
Code Climate CLI
][
cli
]
on your code by using
\
This example shows how to run
[
Code Climate CLI
][
cli
]
on your code by using
GitLab CI and Docker.
First, you need GitLab Runner with
[
docker-in-docker executor
]
(
../docker/using_docker_build.md#use-docker-in-docker-executor
)
.
First, you need GitLab Runner with
[
docker-in-docker executor
]
[
dind
]
.
Once you setup the Runner
add new job to
`.gitlab-ci.yml
`
:
Once you setup the Runner
, add a new job to
`.gitlab-ci.yml`
, called
`codeclimate
`
:
```
yaml
codeclimate
:
...
...
@@ -25,4 +25,10 @@ codeclimate:
This will create a
`codeclimate`
job in your CI pipeline and will allow you to
download and analyze the report artifact in JSON format.
For GitLab
[
Enterprise Edition Starter
][
ee
]
users, this information can be automatically
extracted and shown right in the merge request widget.
[
Learn more on code quality
diffs in merge requests
](
../../user/project/merge_requests/code_quality_diff.md
)
.
[
cli
]:
https://github.com/codeclimate/codeclimate
[
dind
]:
../docker/using_docker_build.md#use-docker-in-docker-executor
[
ee
]:
https://about.gitlab.com/gitlab-ee/
doc/user/project/merge_requests/code_quality_diff.md
View file @
9fd035a1
# Code quality diff
# Code quality diff
using Code Climate
> [Introduced][ee-1984] in
GitLab Enterprise Edition
9.3.
> [Introduced][ee-1984] in
[GitLab Enterprise Edition Starter][ee]
9.3.
If you are using
GitLab CI
you can analyze your source code quality using
Code Climate analyzer docker image. Then GitLab will show you how merge request
c
hanges source code quality right inside merge request widget
.
If you are using
[
GitLab CI
][
ci
]
,
you can analyze your source code quality using
the
[
Code Climate
][
cc
]
analyzer
[
Docker image
][
cd
]
. Going a step further, GitLab
c
an show the Code Climate report right in the merge request widget area
.
![
Code Quality Widget
][
quality-widget
]
## Enabling feature
In order for the report to show in the merge request, you need to specify a
`codeclimate`
job that will analyze the code and upload the resulting
`codeclimate.json`
as an artifact. GitLab will then check this file and show
the information inside the merge request.
Feature can be enabled by following next steps:
1.
[
Analyze project code quality with Code Climate CLI
][
cc-docs
]
2.
Start a new merge request from branch that already has codeclimate job succeed
3.
Wait till merge request codeclimate job succeed
For more information on how the
`codeclimate`
job should look like, check the
example on
[
analyzing a project's code quality with Code Climate CLI
][
cc-docs
]
.
[
ee-1984
]:
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/1984
[
ee
]:
https://about.gitlab.com/gitlab-ee/
[
ci
]:
../../../ci/README.md
[
cc
]:
https://codeclimate.com
[
cd
]:
https://hub.docker.com/r/codeclimate/codeclimate/
[
quality-widget
]:
img/code_quality.gif
[
cc-docs
]:
https://docs.gitlab.com/ce/ci/examples/code_climate.html#analyze-project-code-quality-with-code-climate-cli
[
cc-docs
]:
../../../ci/examples/code_climate.md
doc/user/project/merge_requests/index.md
View file @
9fd035a1
...
...
@@ -107,11 +107,11 @@ creating merge commits, you can configure this on a per-project basis.
## Code quality diff
> In
cluded in [GitLab Enterprise Edition Starter][products]
.
> In
troduced in [GitLab Enterprise Edition Starter][products] 9.3
.
If you are using
GitLab CI
you can analyze your source code quality using
Code Climate analyzer docker image. Then GitLab will show you how merge request
c
hanges source code quality right inside merge request widget
.
If you are using
[
GitLab CI
][
ci
]
,
you can analyze your source code quality using
the
[
Code Climate
][
cc
]
analyzer
[
Docker image
][
cd
]
. Going a step further, GitLab
c
an show the Code Climate report right in the merge request widget area
.
[
Read more about code quality diff.
](
code_quality_diff.md
)
...
...
@@ -216,3 +216,6 @@ git checkout origin/merge-requests/1
[
protected branches
]:
../protected_branches.md
[
products
]:
https://about.gitlab.com/products/
"GitLab products page"
[
ci
]:
../../../ci/README.md
[
cc
]:
https://codeclimate.com/
[
cd
]:
https://hub.docker.com/r/codeclimate/codeclimate/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment