Code Coverage Calculations

I was wondering if there have been any changes to how Sonarcloud calculates code coverage over the past few months. Engineers on my team are reporting that Sonarcloud has been reporting lower than expected code coverage for new front-end code (JavaScript, Typescript, and Vue.js).

When we originally setup our Sonarcloud account 4-6 years ago, we configured our settings to run the Quality Gate against only new code being added for each PR, but it now appears that old legacy code is also being considered. Has this changed? I no longer see a Sonarcloud admin settings option to only calculate code coverage related to the code changes in a PR.

Hey there.

Nothing specific has changed here.

Do the coverage reports themselves (the files generated when you run your tests) also reflect this lower than expected coverage? SonarCloud only reads coverage reports (and assumes 0 coverage for files not reflected in the coverage report at all).