View "New Code" irrespective of issues found

SonarQube v6.7.4

Is there a way in SonarQube to show the NEW source code being considered in scope ? It does show the new code when there are issues found but not when there are no issues under “New Code” section. How do I know what files were considered as “New code” by SonarQube ? Can SonarQube show me the “New code”, irrespective of whether there were any issues in it or not ? Will SCM integration enable such a view ?


Your context isn’t clear. Are we talking about master or some other Long-Lived Branch (LLB), or a PR / Short-Lived Branch (SLB)?

For master/LLBs, the project homepage gives you two shortcuts to the files with new lines:

From there you can drill into the files to see the new lines marked with a yellow highlight:


For PRs, you’ve got the same shortcuts, just moved a little bit



What I am trying to understand is branch-neutral. When a scan happens on top of an existing code i.e. New code in scope, is there any way to find out the scope (code) being considered by SonarQube as ‘New’ ? e.g. if the result show 0 bugs in New code, can I see what is that ‘New’ code on which there are 0 bugs ?
I can go to the ‘Code’ link and look at all the code, and not just the New one.


Use the Measures page to see New Lines (Size domain) or Lines to Cover On new code (Coverage domain).