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
Add option to ignore function coverage #430
Add option to ignore function coverage #430
Conversation
If coverage isn't ignored, the JSON output is extended with property 'gcovr/function' with value True/False.
76b9824
to
fc0ada5
Compare
Codecov Report
@@ Coverage Diff @@
## master #430 +/- ##
==========================================
+ Coverage 95.52% 95.54% +0.01%
==========================================
Files 20 20
Lines 2459 2469 +10
Branches 420 423 +3
==========================================
+ Hits 2349 2359 +10
Misses 48 48
Partials 62 62
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
If coverage isn't ignored, the JSON output is extended with property 'gcovr/function' with value True/False.
fc0ada5
to
e0e84cf
Compare
If coverage isn't ignored, the JSON output is extended with property 'gcovr/function' with value True/False.
e0e84cf
to
66eafcb
Compare
5dfe3dd
to
90b6d2d
Compare
If coverage isn't ignored, the JSON output is extended with property 'gcovr/function' with value True/False.
d5bdbaf
to
6c3f557
Compare
If coverage isn't ignored, the JSON output is extended with property 'gcovr/function' with value True/False.
6c3f557
to
47a5b14
Compare
If coverage isn't ignored, the JSON output is extended with property 'gcovr/function' with value True/False.
47a5b14
to
76582c6
Compare
If coverage isn't ignored, the JSON output is extended with property 'gcovr/function' with value True/False.
76582c6
to
7179bae
Compare
If coverage isn't ignored, the JSON output is extended with property 'gcovr/function' with value True/False.
7179bae
to
8f40935
Compare
If coverage isn't ignored, the JSON output is extended with property 'gcovr/function' with value True/False.
8f40935
to
d4bca2c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a changelog entry, otherwise ready to go :) Thanks for working on this.
Potential future directions:
-
The gcov parser state machine is growing more and more complex. Perhaps it would be possible to separate this into a textual part that generates events for each line, and then various event consumers with simpler state machines that update the coverage data structure. For example when reviewing this code, I was unsure where the
last_was_function_marker
was being reset because it was spread over so many lines. -
For each compiler version, we are generating all output formats. This requires extra effort when updating reference files and slows down the test suite. It would be sufficient to only test JSON output for individual compilers, since the other outputs can be generated from JSON without depending on any compiler. So we could move from O(compilers × outputs) tests to O(compilers + outputs). In some places, the test suite has already been rewritten to use JSON as an intermediate format but the JSON isn't reused between tests and the tests still depend on freshly generated JSON (requiring a compiler).
If coverage isn't ignored, the JSON output is extended with property 'gcovr/function' with value True/False.
d4bca2c
to
f4c2069
Compare
@latk I've rebased and added the issue to the changelog. |
CHANGELOG.rst
Outdated
@@ -33,6 +33,7 @@ Improvements and new features: | |||
- Only remove :option:`--root` path at the start of file paths. (:issue:`452`) | |||
- Fix coverage report for cmake ninja builds with given in-source object-directory. (:issue:`453`) | |||
- Add issue templates. (:issue:`461`) | |||
- Add :option:`--exclude-function-coverage` to exclude the line of the function definition in the coverage report. (:issue:`430`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Building the sphinx docs found an error for us:
- Add :option:`--exclude-function-coverage` to exclude the line of the function definition in the coverage report. (:issue:`430`) | |
- Add :option:`--exclude-function-lines` to exclude the line of the function definition in the coverage report. (:issue:`430`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, currently I'm rebasing and updating the test data.
f4c2069
to
f30bc56
Compare
f30bc56
to
9aa0d49
Compare
If coverage isn't ignored, the JSON output is extended with property 'gcovr/function' with value True/False.
close #398