Coverage displays not configured when New Code only contains changes to tests

We’ve recently had some changes scanned where the only files changed were either CI Pipeline files or changes to tests. This seems to confuse the Code Coverage on New Code box as it displays a message saying Coverage has not been configured:

Coverage
A few extra steps are needed for SonarCloud to analyze your code coverage.

Set up coverage analysis

We spent some time trying to work out why our config only worked on some branches until we realized the above conditions. It would be helpful if in this condition it displayed a message like “No New Code” rather than the steps to set it up.

Hey there.

I think you’re facing a bug that was reported last month:

It only affects PRs with no lines of code that can be covered by tests.

A fix is scheduled in an upcoming hardening sprint.

1 Like