-
Notifications
You must be signed in to change notification settings - Fork 288
Issue 160: Cascaded-directory html reports #687
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
Issue 160: Cascaded-directory html reports #687
Conversation
bb26f9e to
848fe3c
Compare
848fe3c to
47fd53e
Compare
3043093 to
71df7c5
Compare
Codecov ReportBase: 94.39% // Head: 95.55% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #687 +/- ##
==========================================
+ Coverage 94.39% 95.55% +1.15%
==========================================
Files 27 28 +1
Lines 3498 3736 +238
Branches 605 640 +35
==========================================
+ Hits 3302 3570 +268
+ Misses 125 93 -32
- Partials 71 73 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
71df7c5 to
1236637
Compare
|
For the Windows specific data you have to download the artefacts and override the files locally. |
I wish I had a windows box to practice on. :-/ I'll have to come up with something. |
1236637 to
cdce979
Compare
|
Please don't force push. After this we don't see the changes since last review. |
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.
Looks good, only some little comments.
Some general questions:
- Shall directories always be at the top or sorted between the files? Reflect this in the test.
- What shall be done if only one file is in a directory? Is the directory needed in this case or shall the file be added directly, removing one hierarchy level?
|
…plate, order of function impl.
…ssociated with it.
…sorting the file/directory coverage based on branch coverage.
Update: |
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.
Some suggestions regarding path normalization.
Since I wrote this, I changed the sorting method to run python-based sort_coverage() even within the subdirectory level, based on feedback on this PR. I think there's still a future improvement that a client-user would like to sort based on any column, that it would be javascript/typescript-based sort, but that's just for future-thinking. |
|
Only one last question before merging this PR.
If you agree that the cascading directories only make sens with the details I would also suggest to rename the option to |
|
Naming command line options is the kind of thing where we only have one attempt to get it right – once some behaviour is implemented, people will depend on that for the next half decade or so. I agree with @Spacetown that cascaded-directories will typically imply detail-pages. I expect that this option will be used quite frequently, and will replace My preferred solution would be three levels of detail in the HTML report, with each level including the content of the previous levels:
If we want to enable nested summaries without per-source-file annotated reports, I'd rather do this via something like |
I think this options are the way we should go. Since nested without details will hide the needed information someone needs good arguments to request this. |
- The option is changed from a flag to a output option (same as --html-details). Use all possibilities to set the output file. - Add --html-syntax-highlighting as main name for --html-details-syntax-highlighting since it is used for details and for nested reports.
218ef00 to
e0c775a
Compare
e0c775a to
93c7b4a
Compare
|
@macetw I've pushded the open changes on your branch. If you don't have pending changes I can merge the PR. |
|
For what it's worth, these additional changes by @Spacetown look good. Thank you. |
Please proceed as you see fit. Thank you |
|
@macetw Thanks for implementing this long requested feature. |
…istics per directory. (gcovr#687) Co-authored-by: Spacetown <[email protected]>
This change implements a hierarchical (aka cascaded) directory-based html report. It adds a new argument: --html-cascaded-directories
This change re-implements how we sort the lists of source files in html, that it uses Jinja to sort, using data stored with what we pass to the template. This way, the sorting can also take into account the subdirectories that have aggregated statistical data that goes with it.
This change needed to implement a new class that manages different directories and the source files they go in. This class also knows about the parent directory that it is inside and the statistics for all of the given directory's contents.
#160
Closes #544