Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#7 lcov: highlight excluded source lines

open
nobody
Tools (6)
5
2010-06-08
2010-06-08
Rene Liebscher
No

Hi,

using exclusion markers is a fine thing, if one has source lines which can never reached or only at hardware failures or something similar.
But in the source code view (html) these lines are not marked at all, so it is not easy to spot by browsing the file if there are any regions which are excluded.
Highlighting these lines makes it easier if someone has to verify your software and tests and want to check them if only really needed lines are excluded.

Also it would be useful to have in the statistics an option to show them as "100% (94.6/5.4)" which makes clear how much was reached by testing/coverage and how much was reached by excluding unreachable code.

Another interesting thing would be to check if excluded lines really have counters with value 0. In case they don't have, then there is a problem with your software, tests or exclusions.

I guess including the excluded lines in the output would require to extend the info file format, as well as geninfo and genhtml to handle this new information.

Kind regards

René Liebscher

Discussion

  • Thanks for the input. These sound like useful features to me - I'll add them to the list of possible extensions for future lcov versions.