Closed philippjenni closed 2 months ago
I have tried to solve the problem in a branch by adapting the report accordingly. I will create a PR, but it still needs to be checked. I'm not sure if the correction is in the right place. But the error has been fixed with the patch.
Thank you. Will have a look next week.
Currently I'm not able to reproduce your problem?
Could you please share two (minimal) input XML files? You can send them privately via email: reportgenerator@palmmedia.de or share them here.
Thanks for the files. Will have look soon.
I just analyzed your coverage files.
Your code base contains classes with nested classes. By default, ReportGenerator treats a class and all nested types as one unit. This is good in case you want to generate a HTML report.
If you want to generate a Cobertura file, this behavior is not perfect.
Now methods with the same name in different nested classes appear under one parent class.
Merging them, as your pull requests suggests, is also technically not correct.
You are merging methods from different classes (e.g. .ctor
).
But there is a better solution. You can use the command line parameter settings:rawMode=true
See this comment for all details: https://github.com/danielpalme/ReportGenerator/issues/630#issuecomment-2008130255
Describe the bug If I create a Cobertura report from different 2 XML Coverage Reports, it can happen that methods are listed twice in the generated Cobertura report, which is not permitted for Cobertura.
To Reproduce The following input helps to reproduce your issue:
The generated XML should now contain multiple methods for the classes. The name and signature are identical.