Two days ago in one of our projects SonarCloud has started to report back 0% code coverage on new code. This is causing our quality gate to fail in our PR. We have tried many different configuration options as well as updating libraries to see if something changed on our end to cause this to happen. Nothing seems to be changing the outcome. I was able to output the coverage report to the pipeline and that coverage report says the new code we changed has 100% coverage, however SonarCloud still reports back 0%.
Below is the command we are using for the sonarcloud scanner. We’ve verified this command is similar to another projects command which is not reporting 0% coverage.
I forgot to update this, but we were able to fix this issue simply by changing our reportPaths from typescript to javascript. It is odd that this change is required because just a couple days prior this post the above configurations were working fine. In addition we have had to modify multiple other repositories from using typescript in the reportPaths to javascript. So our new working configuration is the following