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
Single file HTML output. #613
Comments
Hello @smavridis, thanks for this suggestion! It definitely looks like an interesting idea, and like a useful feature for some people. The I have some concerns with your proposed implementation but that's something best discussed iteratively in a code review. For example, I don't like that partial HTML fragments are rendered up front and then concatenated, when instead the necessary data could be collected and then rendered as part of the template. I also think that the prototype breaks links to particular line numbers. But to clarify, the fact that I'm already nitpicking such details means that I'm pretty much on board with this feature. What it needs is a good name. Since it relates to |
I wanted to minimize the modifications/additions to the existing code that's why i did the prototype this way, i agree creating new templates is a better approach.
Yes you are correct.
I will change it to
I have thus far avoided the use of js by using the css :target selector for the showing/hiding of pages. Thanks for the feedback, i will try to address them in the next days, and get back to you. |
I don't think it's possible to do without JS for a single-page report unless all other anchors are entirely removed – for example, navigating to a function or line would mean that the surrounding part of the report isn't the
This should be doable without requiring any libraries. During your work you'll discover that the code for the HTML writer is not very pretty. If you see easy wins, feel free to restructure it a bit to make your changes easier – but please use separate commits for refactoring and for enhancements. If you have small questions along the way, feel free to ask in the chatroom (Gitter or Matrix). |
Hello, are there any updates on that nice to have feature? |
@smavridis Have you done some work on this? |
@smavridis Please can you take a look at the linked PR? |
@latk, @smavridis Will one of you have time to check the linked PR? |
@smavridis Will you be able to check the PR? |
Hello, i had forgotten about this ... 2 years is a long time. I will try an give it a try in the weekend to see the output, thank you for your effort. |
I will raise a separate Pr to fix the paths. I'm glad if you only comment on the PR. This is ev er n better then forcing the merge. |
@smavridis Have you checked the report? |
Is your feature request related to a problem? Please describe.
I would like the detailed HTML coverage report to be a single file.
Initially i thought html-self-contained would do this, but it does not support the detailed output.
Describe the solution you'd like
A single HTML file containing the detailed report.
Describe alternatives you've considered
In theory i could transform/'merge' the current output after gcovr.
This would require parsing the HTML output and then 'merging' it, but seems the wrong way to do it.
Ideally i would like for gcovr to provide this functionality as it already has the data and just the output needs tweaking.
Additional context
I have made a proof-of-concept in https://github.com/smavridis/gcovr/tree/single_file_html.
As per the guidelines i opened this issue before creating a pull request for more feedback.
Let me know what you think, and thank you for gcovr.
The text was updated successfully, but these errors were encountered: