Code coverage on SonarCloud takes code older than defined date

There is issue with collecting code coverage on project. It is taking code older than the date that is specified as new code date(March 1st) and showing it as new code.

We suspect it might be something regarding git blame.


Welcome to the community!

In the absence of blame data from your SCM, SonarQube has to fall back on analysis date.

Is there a .git directory in analysis/project root?


Hello Ann,

Thank you for the warm welcome!

Yes there is.
I will paste it here.

gitignore.txt (5.1 KB)

Many thanks,

You need to fetch the full git history (not just a shallow version of the head), with github actions:

  - uses: actions/checkout@v2
      fetch-depth: 0
1 Like

Thanks Guillaume, will try that, I’m doubting if Azure is supporting this.


These two commands solved the issue.
Now new code coverage is displaying correctly.

Thank you all for support.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.