-
Notifications
You must be signed in to change notification settings - Fork 283
line coverage is polluted by comment and function argument #646
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
Comments
Yes, this is a known bug with the decision coverage analysis discovered in #600. The analysis looks up coverage data line by line, but this creates coverage data for that line if it doesn't already exist – defaulting to an uncovered line. The decision coverage mode is fairly experimental. Please stick to the more reliable line- and branch-coverage metrics for now. As you correctly determined, the decision analysis only runs when explicitly requested. |
@latk Thx for the clarification. |
No, gcovr's branch coverage and decision coverage are fundamentally different concepts, though they are related. On simple C code, the two metrics should be almost equivalent.
|
The bug with the --decision option should have been fixed in #617. To try it out you can install the development version (see https://gcovr.com/en/stable/installation.html). |
Uh oh!
There was an error while loading. Please reload this page.
I am using Gcovr to get line, branch and decision coverage. I notice commented out lines or comment are taken into account of line coverage.
The cmd I am using: gcovr --decision.
interesting thing to note: the line coverage is good if not generate decision coverage
Gcovr version:
commit fcc269a (HEAD -> master, origin/master, origin/HEAD)
Author: Klaus Weinbauer 51136324+klausweinbauer@users.noreply.github.com
Date: Sat Jul 30 11:34:56 2022 +0200
The text was updated successfully, but these errors were encountered: