SonarQube version: 8.9.6
Hi team,
I follow Sonar Gerrit | Jenkins plugin to test pull request analysis in jenkins using sonar-gerrit plugin.But something diff happened in my test.
I config jenkins pipeline job to trigger by gerrit when patchset created, And run ‘mvn clean verify sonar:sonar -Dsonar.pullrequest.key=${env.GERRIT_CHANGE_NUMBER}-${env.GERRIT_PATCHSET_NUMBER} -Dsonar.pullrequest.base=${env.GERRIT_BRANCH} -Dsonar.pullrequest.branch=${env.GERRIT_REFSPEC}’ to run a PR analysis. But seems something wrong of the result like below pic
But if I change the cmd to ‘mvn clean verify sonar:sonar’. The analysis result will tell some issues.
The two tests are triggered by same code change. So I wonder is there something need to config in SonarQube or Jenkins? More info below for reference