Does the Sonar for Stash work with multi-module projects?

Luuk van den Broek January 25, 2015

I can't get the issues to show in the diff view. 


I have a single Git repo which hold several modules. the GAV is something like:

com.mycompany.project
com.mycompany.project.module1

com.mycompany.project.module1.submodule1

 

When running a sonar analysis from the repo root sonarqube assigns the following project keys:

com.mycompany.project:branch-name

com.mycompany.project:module1:branch-name

com.mycompany.project.module1:submodule1:branch-name

The add-on is configured with the project key : com.mycompany:project

However it fails to show information in the diff pane. I tracked the issue down to the call that Sonar for Stash makes to sonarqube:

The call Sonar for Stash makes:
https://mysonar.com/sonar/api/issues/search?resolved=false&severities=INFO,MINOR,MAJOR,CRITICAL,BLOCKER&components=com.mycompany:project:branchname:module1/submodule1/src/main/java/com/mycompany/path/to/file.java 

 

The correct url for the call:
https://mysonar.com/sonar/api/issues/search?resolved=false&severities=INFO,MINOR,MAJOR,CRITICAL,BLOCKER&components=com.mycompany.project.module1:submodule1:branchname:src/main/java/com/mycompany/path/to/file.java 

Have I misconfigured something or does the add-on simply not support multi-module GAV as parsed by sonarqube?

1 answer

0 votes
Mibex_Software
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 26, 2015

Hi,

We've just released version 1.2.0 of Sonar for Stash yesterday which now includes multi-module support. Could you please upgrade and try again? You have to tick the checkbox "Multi-module support" in the repository settings of Sonar for Stash and specify the working sub-directory setting in the same way as you probably have done in Sonar for Bamboo.

Hope that helps.

Kind regards,

Michael from Mibex Software

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events