I am trying to activate the code climate report for merge requests pipelines in GitLab. The CodeClimate analyser is running but there are not shows any warnings when I add some bad code. There might be some configuration which I have missed.
I have added the following to my .gitlab-ci.yml file in the project rot folder:
include:
- template: Code-Quality.gitlab-ci.yml
And I have added the .codeclimate.yml file looks like this:
plugins:
cppcheck:
enabled: true
config:
check: all
language: c++
stds:
- c++14
- c++17
The build job completes with the following lines at the end of the log:
f47a75dcba39: Pull complete
Digest: sha256:c8afb8c2037f7b9c5c9ae198aff00b1cf80db11d3591fbe89dfb3c69192663f1
Status: Downloaded newer image for codeclimate/codeclimate:0.72.0
WARNING: A new version (v0.85.3) is available. Upgrade instructions are available at: https://github.com/codeclimate/codeclimate#packages
Uploading artifacts...
gl-code-quality-report.json: found 1 matching files
Uploading artifacts to coordinator... ok id=227197201 responseStatus=201 Created token=4xyzSXzN
Job succeeded
What could be wrong here, since the merge request doesn’t show any CodeClimate report?
In GitLab I have created one merge request with the configuration change (merging into master). And one merge request with some bad code, based on the first merge request with the configuration (merging into master).
The bad code:
int non_used_int;
int non_initialized_int;
int dummy = non_initialized_int;
// empty for loop
for (int i=0; i<100; i++) {
}
And a final note: I am using the shared GitLab runners provided by GitLab.
Guides I have followed: