Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 7.7
-
Component/s: Coverage & Tests, Scanner
-
Labels:None
-
Estimate:Hours
-
Edition:Community
-
Production Notes:None
Description
If a coverage engine reports there are no lines to cover in a file, then we don't store any measure:
https://github.com/SonarSource/sonar-enterprise/blob/bf8b731205eab25d23f23384f751bcf38ad5d184/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/DefaultSensorStorage.java#L490
And then, there is a fallback on using executable lines computed by the code analyzer:
https://github.com/SonarSource/sonar-enterprise/blob/master/sonar-scanner-engine/src/main/java/org/sonar/scanner/source/ZeroCoverageSensor.java#L66
That may be not what is expected by the user:
https://github.com/jacoco/jacoco/issues/806
We should "remember" that coverage was stored, even with no lines to cover, and only fallback on executable lines when the coverage was not saved on a file.
Attachments
Issue Links
- relates to
-
SONAR-11795 Drop persistit use on scanner side and move coverage measures computation to CE
-
- Closed
-
-
SUPPORT-12391 Loading...