Change: move total counting out of print_report_xml_start#2693
Merged
greenbonebot merged 11 commits intomainfrom Jan 12, 2026
Merged
Change: move total counting out of print_report_xml_start#2693greenbonebot merged 11 commits intomainfrom
greenbonebot merged 11 commits intomainfrom
Conversation
a-h-abdelsalam
approved these changes
Jan 12, 2026
Contributor
Author
|
@a-h-abdelsalam Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Move the counting of the result totals out of
print_report_xml_start.This PR starts by moving some key variables in
print_report_xml_startinto thectxstruct. Then it moves the block that does result counting out to a new functionprint_report_get_totals. Moving the variables allowsprint_report_get_totalsto take a single arg. The function also uses that single arg to pass the counts back to the caller.Note that, as with previous PRs, the variables moved into the
struct print_report_contextare automatically initialized to zero, due to the init of the struct:print_report_context_t ctx = {0};.Why
Another small step in reducing the size of
print_report_xml_start, so that it's easier to understand and maintain.References
Follows /pull/2669
Testing
I got a single report with the PR, then got the same report on the
mainbranch. I made sure they were the same. I did that with two timezones just to be sure (using thetimezoneterm in the filter).