Hi guys,
I wrote a few days ago about analysis between 2 git commits. The purpose is to get the metrics on the difference - coverage on new code, issues on new code, etc.
I managed to run it successfully trough jenkins with 1 analysis with previous date on the first commit from the branch (the one it is rebased on) and a second analysis on the last commit.
So sonar shows me the "new code" metrics, but most of the time it is showing me wrong values :( For example ... I change 1 line of code, or a pom.xml file and sonar shows me coverage on new code around 50-60% which ofcourse is wrong.
However I am not sure if the problem is in sonar or in my jenkins environment ...
I am launching maven install and after this a maven sonar analysis, before the build starts I am cleaning the jenkins workspace and make a fresh checkout of my project. I am running the maven sonar analysis from my top level maven pom (multimodule java project), I tried to do it with -o option for offline and also without it, but the result is the same. 1/2 ot my analysis show wrong coverage on new code, new issues, new TD
Anyone having an idea what I can do? I'll try to reproduce it with smaller project as the one I am using is a big one, but decided to ask here first.
Thanks!