Skip to content

Conversation

@clock999
Copy link
Contributor

This is to fix the bug:
https://trac.cppcheck.net/ticket/8089
Title:
feature request: Show date/time of check in HTML report
Description:
Cppcheck HTML report is a helpful tool to automate checking. It could be extended by the date/time information, when the checking was finished. This date/time information assists developers in fixing issues.

@chrchr-github
Copy link
Collaborator

Thanks for your contribution.

A comment from the ticket:

Adding content to XML might break existing solutions. So I suggest to use timestamp of XML file.

Is there a reason you need the timestamp in the XML? In a CI environment, the timestamp will also be available elsewhere. If we implement this at all, it should probably be an option.

@clock999
Copy link
Contributor Author

Hi CHR,
Thanks for your comments. I think it is ok to use the timestamp of the xml file. With my idea, I just want to only make changes to the script htmlreport/cppcheck-htmlreport. But I don't know how to make the fix to be useful for the CI Env. Could you please give more information about that? Another question is that we can use stdin as the input for htmlreport to get xml, if the input is stdin, I just want to use the current time of the system to be the timestamp of the report. How do you think about that?

@chrchr-github
Copy link
Collaborator

Unfortunately I know nothing about the HTMLReport, so maybe @danmar or @firewave would like to chime in.
In any case, there should be a test for this change.

@clock999
Copy link
Contributor Author

Hi CHR, thanks for your kind reply, do you mean that I need to submit some test code with the commit? As I understand, I need to add some codes under cppcheck/test, right? To merge this fix, what steps or jobs are expected to be done further? Could you please help comment more? Thanks a lot!

@chrchr-github
Copy link
Collaborator

Hi CHR, thanks for your kind reply, do you mean that I need to submit some test code with the commit? As I understand, I need to add some codes under cppcheck/test, right? To merge this fix, what steps or jobs are expected to be done further? Could you please help comment more? Thanks a lot!

These tests seem related: https://github.com/danmar/cppcheck/tree/main/test/tools/htmlreport, so you should probably add a test there.

@danmar
Copy link
Owner

danmar commented Feb 24, 2025

I would prefer this PR title:

Fix #8089 (feature request: Show date/time of check in HTML report)

That will make more sense in the git log later

@clock999 clock999 changed the title fix bug 8089 Fix #8089 (feature request: Show date/time of check in HTML report) Feb 25, 2025
@danmar danmar merged commit 3363525 into danmar:main Mar 18, 2025
60 checks passed
@danmar
Copy link
Owner

danmar commented Mar 18, 2025

@clock999 thanks for your contribution. which name would you like that I add in our AUTHORS?
https://github.com/danmar/cppcheck/blob/main/AUTHORS

@clock999
Copy link
Contributor Author

@clock999 thanks for your contribution. which name would you like that I add in our AUTHORS? https://github.com/danmar/cppcheck/blob/main/AUTHORS

Hi Daniel, please add Wang Yang as my name to the list. Thanks so much!

@clock999
Copy link
Contributor Author

clock999 commented Mar 19, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants