Sonar for Stash diff screen

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:



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:



10 answers


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 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,


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



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


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

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

You could have a look at your Stash log. All lines of the plug-in start with "SONAR:". When you open the file "" 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".

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.

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?

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.

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 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.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 07, 2019 in Marketplace Apps

A Timeless Love Story

It started as any story starts, on a normal, rainy day.   Admin meets App, and her name was Klok2, and like any first relationship we were both trying to make it work but neither one knew what...

475 views 8 27
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you