sonarcube is ignoring coverage for non unique filenames within project (in different lerna subpackages)

46 Views Asked by At

I'm having an issue where sonar is gathering multiple lcov.info files (each from different lerna subpackages) and where there are some filenames/paths that are repeated across packages, eg src/model/index.ts. in these cases it is only considering the coverage for one of them. The others are showing as having 0% coverage in the sonar report. This is leading to jest being satisfied that coverage is >90% in each of the lerna subpackages, but sonar thinks it is <70%.

We could fix this by renaming the file to have a unique name across the whole project, but we will end up with something artificial and in conflict with the whole concept of lerna.

Did anyone see anything similar? Any solutions?

lcov.info contains lines like:

SF:src/model/index.ts

0

There are 0 best solutions below