Since SQ 6.2 this feature is provided out of box by SQ and should be forced for every project.
In order for SQ to save zero coverage, plugin should provide for every executable file a measure EXECUTABLE_LINES_DATA that will tell platform what are executable lines (ie lines to cover by tests).
Note that the metric was introduced before 6.2 but due to an issue, measure should only be provided when runtime is 6.2+.
* In fact we save zero coverage for any non-commented line of code (ncloc).
To sum up
- SQ < 6.2 no change in behaviour:
- don't provide EXECUTABLE_LINES_DATA
- keep saving or not zero coverage based on property
- SQ >= 6.2 force-zero-coverage is always on
- provide EXECUTABLE_LINES_DATA