-
Notifications
You must be signed in to change notification settings - Fork 21
Troubleshooting
-
Q : My analysis log throws an error telling that the Review configuration is not valid. A : Is the SonarQube analysis triggered by a Gerrit review ? Most errors in the Review configuration are thrown because the analysis is run with
mvn sonar:sonar
and not triggered by Jenkins. It can happen if you have multiple jobs under Jenkins which point to the same SonarQube project. Some jobs are triggered by the review, some might be triggered by a cron independently. What you can do is to add-DGERRIT_ENABLED=false
as a parameter for jobs that should not run the gerrit trigger plugin. -
Q : No results are sent back to Gerrit but SonarQube displays new issues A : Starting with SonarQube 5.2, you must force analysis mode to issues with
-Dsonar.analysis.mode=issues
. -
Q : When using SonarQube 5.1 and running analysis in preview or incremental mode, results are not sent back to Gerrit A : SonarQube 5.1 dropped the execution of the PostJob part of plugins in preview and incremental mode. It was restored in 5.2. If you still need to execute the plugin in SonarQube 5.1, you have to run the analysis in normal mode. CAUTION : running in normal mode records every analysis results in SonarQube’s database. It might not be what you want.
-
Q : I’m seeing
[GERRIT PLUGIN] changeId or revisionId is empty. Not called from Gerrit ? Soft-disabling myself.
in the log. What is wrong ? A : The sonar-gerrit-plugin is installed on your SonarQube server and enabled, either globally or locally to the project. For the run you consider, it looks like the SonarQube analysis has not been triggered by the CI plugin. To avoid your job ending in ERROR state, the plugin gently disable itself for this run. If your project will never be triggered by a gerrit-aware CI tool, consider disabling the gerrit-sonar-plugin at the project level. -
Q : My project does not follow Maven layout requirement and it contains a
src
directory. File matching fails A : We are trying to find a workaround for this issue. sonar-gerrit-plugin was design mostly for Java Maven projects. You can follow issue #37 for more information.