(I don't have a Trac account so I couln't create a ticket directly there).
If I generate an html report, the statistics page stop at the last severity with a non zero count.
I think there is an error in the code below (htmlreport/cppcheck-htmlreport line 669)
forsevinSEVERITIES:_sum=0stats_templist={}#ifthewehaveanstylewarningbutwearecheckingfor#portability,wehavetoskipittopreventKeyErrortry:forfilenameinstats_countlist:try:#alsobailoutifwehaveafilewithnosev-results_sum+=stats_countlist[filename][sev]stats_templist[filename]=(int)(stats_countlist[filename][sev])#file:amount,exceptKeyError:continue#don'tprint"0 style"etc,ifnostylewarningswerefoundif(_sum==0):breakexceptKeyError:continuestats_file.write("<p>Top 10 files for "+sev+" severity, total findings: "+str(_sum)+"</br>\n")
Where
if (_sum == 0):
break
breaks from the loop
forsevinSEVERITIES:
instead of continuing to the next severity.
I changed the break for a continue and it did works fine.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
(I don't have a Trac account so I couln't create a ticket directly there).
If I generate an html report, the statistics page stop at the last severity with a non zero count.
I think there is an error in the code below (htmlreport/cppcheck-htmlreport line 669)
Where
breaks from the loop
instead of continuing to the next severity.
I changed the break for a continue and it did works fine.
Yes, that looks wrong.
Thanks for reporting this.
I try to bring back htmlreport testing in travis and fix this issue.