-
Notifications
You must be signed in to change notification settings - Fork 240
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
Closing Curly braces ("}") following return statements not ignored #129
Comments
You are doing nothing wrong (AFAIK). The bogus lines seem to be coming from gcov.
You probably also noticed that those lines appear and disappear somewhat arbitrarily: different compiler version, changed flags, new or changed code, etc.
I implemented a ‘--filter …” feature to remove (most of) these, plus a few other artifacts.
You can see some discussions in issues #101, #108, and #98, and a discussion of the fix in pull request #86.
You might want a more aggressive ‘line’ filter than the one I implemented. My goal was to eliminate bogus “UIC” and “LBC” code from differential coverage reports (…because those categories trigger our Jenkins to fail the job).
Hope this helps
Henry
|
Thanks, is |
Sorry – not merged.
There are two things you could do:
- Download the fixed version and install somewhere in your sandbox. (May not endear you to IT or security guys.)
- Put some exclude directives around the braces where this is happening.
(This will be very painful/never-ending, as you will find new bogus lines appearing when you change code or environment – and even sometimes when you don’t.)
The last option is to wait for the pull request to be merged (but it has been a year – so I recommend not to hold your breath.)
Sorry to be the bearer of bad news.
Henry
|
Bummer, thanks for your help! |
@bcaddy In case you still got this issue, try adding the compile options |
Thank you, I'll try it out. |
I found that
lcov
is reporting lines with just a}
that follow a return statement when they should just be excluded. I don't see this issue in other peoples coverage reports and lcov does appear to be excluding the opening{
properly. What am I doing wrong?The text was updated successfully, but these errors were encountered: