Reputation: 826
I have been trying to find new code coverage in sonarqube. I am following below steps to get the new code committed to git so I can find coverage on it.
I have two git branches x and y. I am running sonar analysis on x and can see the analysis. Branch y has new commits, on running analysis on y. I can see new code smells, issues introduced but not new code ( under "Coverage on New Code") added in this branch over x. I can see new code in the files on sonar.
Below is the example:
Suppose I have a master branch and local branch (created from master). Analysis work fine on master and local branch at this point. I added few new commits in a local branch and merged (from git plugin in IntelliJ) it with master branch. Now when I am running analysis on master branch, I don't see new code ( under "Coverage on New Code") whereas all other parameters code smells, Bugs etc gets updated with respect to new code.
I am only able to see data under "Coverage on New Code" section if I make commits on master branch instead of merge from local.
SCM: git
Sonarqube version: 7.0
Sonarscanner version: 3.0.3
Please let me know if I am doing anything wrong or how to solve this issue.
Upvotes: 3
Views: 1817