-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: Report no coverage (hits=0 for all lines) for files that were not executed #290
Comments
Thank you for this suggestion, but gcovr will already report zero coverage for uncovered files! It is sufficient if the source file is referenced in a .gcno file that the compiler generates, and it is not necessary that a .gcda file was created during test execution. However, gcov/gcovr cannot know about dead code that the compiler eliminated. If a file only consists of dead code (like a C++ template that was never instantiated, or a static function that was never called), it will not be considered as uncovered – it simply does not exist as far as gcovr is concerned. There is no good workaround. I'm closing this issue because AFAIK this feature already exists. If you have a problem with un-executed files, please add the relevant details so that I can reopen. E.g. the output of running gcovr in |
Ok great thank you, this is good news. |
Related: as discussed in issue #100, whether this works also depends on the compiler/gcov version. GCC versions 5.5+, 6.2+, and 7+ are expected to work. |
This would be a good feature to add this, because today we need to use lcov tool to do so.
See: https://stackoverflow.com/questions/23923040/generating-empty-gcda-files
Or I could be great to know if a tool to generate gcda files from a gcno exists.
The text was updated successfully, but these errors were encountered: