Sage-Bionetworks / sage-monorepo

Where OpenChallenges, Schematic, and other Sage open source apps are built
https://sage-bionetworks.github.io/sage-monorepo/
Apache License 2.0
21 stars 12 forks source link

[Bug] Explore why coverage in SonarCloud didn't increase as much as expected #2342

Closed tschaffter closed 9 months ago

tschaffter commented 9 months ago

Is there an existing issue for this?

What product(s) are you seeing the problem on?

OpenChallenges

Current behavior

For the image service, JaCoCo reports a coverage of 58%. SonarCloud reports a coverage of 23% (https://sonarcloud.io/summary/overall?id=openchallenges-image-service). Could it be that files configured to be ignored by JaCoCo are not ignored by SonarCloud. My understanding is that SonarCloud uses the metrics generated by JaCoCo.

Expected behavior

No response

Anything else?

No response

Commit ID

7536af1049a9e36ef344d927ca252b4d18f2e7ec

Are you developing inside the dev container?

Code of Conduct

tschaffter commented 9 months ago

Update 2023-11-09

The issue is that SonarCloud includes Java files that are excluded from the JaCoCo coverage report. E.g. SonarCloud detects as 0% the coverage of src/main/java/org/sagebionetworks/openchallenges/image/service/configuration/HomeController.java

But the the file is excluded from JaCoCo report. No occurrences of "HomeController" are included in the XML report.