gabrie-allaigre / sonar-gitlab-plugin

Add to each commit GitLab in a global commentary on the new anomalies added by this commit and add comment lines of modified files
GNU Lesser General Public License v3.0
713 stars 207 forks source link

No codeclimate.json generated for GitLab Starter #180

Closed jacobk closed 5 years ago

jacobk commented 5 years ago

Plugin version: 4.0

Is the codeclimate.json generation supposed to work with GitLab Starter? https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html

No codeclimate.json file is generated when I run:

/gradlew --stacktrace sonarqube -Dsonar.analysis.mode=preview -Dsonar.gitlab.commit_sha=$SHA -Dsonar.gitlab.ref_name=$BRANCH -Dsonar.gitlab.project_id=$PROJ -Dsonar.gitlab.json_mode=CODECLIMATE
gabrie-allaigre commented 5 years ago

Hi, Have you full log ? Thanks

jacobk commented 5 years ago

Hello, Thanks, which log, Should I run gradle with -d is that enough?

gabrie-allaigre commented 5 years ago

yes

jacobk commented 5 years ago

Ok, here it is:

sonarbuild.log

jacobk commented 5 years ago

Actually seems like I managed to generate a file now, but it was in the root of the repository, I expected to find it in the folder with the java/gradle project.

jacobk commented 5 years ago

However it's empty. I have a comment like this from the plugin: image

If I run the command line above with that SHA and branch name I was expecting the same errors to be present in the codeclimate.json (it's simply []). But maybe this assumption is wrong?

jacobk commented 5 years ago

My bad again. Was running on the wrong branch locally. Works as intended!

gabrie-allaigre commented 5 years ago

Good