Sonar for Stash diff screen

Eclipse Trading August 24, 2015

I need some guidance on how the setup and diff screen works. For example, I have configured to only show MAJOR issue or more in the repo settings:

sonar-for-stash-setting1.png

 

However in the diff screen, I am setting all issues (including minor and trivial)... am I looking at the wrong place? also, I tried un-checking duplicated line, however, it still shows up in the diff screen , as following:

 

sonar-for-stash-setting2.png

10 answers

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.
August 28, 2015

The statistics shows the number of all issues in the source branch vs all issues in the target branch. In the pull request diffs, you'll only see issues that are new by incorporating the code from the source branch into the target branch. If this is not the case in your project, there is a bug in the add-on and you should open a bug report at https://mibexsoftware.atlassian.net/browse/SONAR. Concerning the problem with the not shown issue in your pull request diff ("load of known null value"): could you please also open a bug report on our JIRA instance? There you can attach the Stash log entries which would very much help in resolving this problem. And this will have the additional benefit that the JIRA instance is protected (non-public) compared to Atlassian answers.

0 votes
Eclipse Trading August 27, 2015

If this compares latest feature-branch vs latest develop branch, I think that is fine. I think the only issue is developer may want to see all issues introduced in this pull request, and as mention this isn't working for my project so something is missing. Do I need to enable debug to see these errors? I am also thinking what is the best way to pass the log or information to you to investigate further.

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.
August 25, 2015

Are you talking about the pull request statistics shown by the plug-in? These indeed compare the latest results of your feature branch against the latest on develop. Would you expect to see the delta (issues, coverage %, etc.) between the latest two SonarQube runs of your feature branch?

0 votes
Eclipse Trading August 25, 2015

There is another issue: when i view the analysis for the feature branch, i compare it with changes over past 30 days, I thought it will compare the latest analysis vs. the first build(branch off develop).. instead it compared against the develop branch.

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.
August 25, 2015

You could have a look at your Stash log. All lines of the plug-in start with "SONAR:". When you open the file "PnlProcessor.java" in your pull request, you should see an entry in the Stash log requesting all issues for this file from SonarQube. In that output, you should then find the critical issue "Load of known null value".

0 votes
Eclipse Trading August 25, 2015

No its not open source, if you give me some pointers perhaps i can try to troubleshoot a bit first.

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.
August 25, 2015

Is the project you are using open source so that I could try to reproduce this issue?

0 votes
Eclipse Trading August 24, 2015

So I added a critical issue into the code, as Sonar analysis reported it as Critical in the feature branch analysis:

sonar-for-stash-setting4.png

 

Now I go into the diff screen, It tells me this PR has no sonar issue:

sonar-for-stash-setting3.png

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.
August 24, 2015

Hi,

The settings which kind of entities (issues, duplicate code and coverage markers) you want to have shown is only for the code diffs in your pull request, but doesn't have an influence on the statistics area.

Please feel free to add a feature request for this at https://mibexsoftware.atlassian.net/browse/SONAR/ if you want to have this changed. Also, if you see issues with a priority less than your configured threshold, please also create a bug report.

Best regards,

Michael

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events