New code coverage is shown as 0% for files that were not changed in PR

Hi!

  • We’re using SonarQube Developer Edition Version 8.7 (build 41497) & have “Sonar way” quality gate set by default.
  • Could you please explain why new code coverage is shown as 0% for many files that were not changed in the PR? This behavior is observed only in the List view of Measures.

Thank you.
Regards, Valeriia

Hi Valeriia,

Analysis is seeing those files as changed in the PR. It would be worth clicking through on a few to see what’s marked as new code (i.e. highlighted in yellow).

 
Ann

1 Like

Actually, because branches are fetched after running coverage, it doesn’t have the information it needs. Basically, fetching before running tests, fixed the issue.

1 Like

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