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

how to find sonar-gitlab report #154

Open IscoGary opened 6 years ago

IscoGary commented 6 years ago

Hello Gabriel,

I'm new to gitlab-sonar,I have some questions : as we know ,sonar-scanner will show comment and report issues after the SonarQube analysis,but only top 10 extra issues are summarized.But I want to see all the issues on Gitlab or send a complete report rather than find it on the SonarQube server,so are there any methods?

gabrie-allaigre commented 6 years ago

Hi,

Change global template with https://github.com/gabrie-allaigre/sonar-gitlab-plugin/blob/master/templates/global/all-issues.md

IscoGary commented 6 years ago

Copy it into sonarqube server-administration-configuration-general settings-gitlab-Global template, right?

gabrie-allaigre commented 6 years ago

Yes

IscoGary commented 6 years ago

I have changed that,and the analysis is successful ,but something is wrong.

`ERROR: Error during SonarQube Scanner execution ERROR: SonarQube failed to complete the review of this commit: Unable to comment the commit ERROR: Caused by: Unable to comment the commit ERROR: Caused by: GitLab is not respondingINFO: Final Memory: 51M/4139M INFO: ------------------------------------------------------------------------

ERROR: Caused by: Server returned HTTP response code: 502 for URL: http://xxx/api/v3/projects/2688/repository/commits/1de615872b6a3e158e08561ee49f6224630b6c1f/comments ERROR: `

gabrie-allaigre commented 6 years ago

Plugin version ? And gitlab version ? Please

IscoGary commented 6 years ago

plugin3.0.1 and GitLab Community Edition 9.5.5

IscoGary commented 6 years ago

I just found that although it's failed ,I can see all the issues in Gitlab. And I just add some plugin properties:

sonar-scanner -...... (some properties) -Dsonar.gitlab.max_blocker_issues_gate=200 -Dsonar.gitlab.max_critical_issues_gate=200 -Dsonar.gitlab.max_major_issues_gate=200 -Dsonar.gitlab.max_minor_issues_gate=200 -Dsonar.gitlab.max_info_issues_gate=200

Are these properties right?

gabrie-allaigre commented 6 years ago

maybe the comment field is too big for gitlab?