Skip to content

Commit

Permalink
#663: Improved support for Cobertura files generated by "Microsoft Co…
Browse files Browse the repository at this point in the history
…deCoverage"
  • Loading branch information
danielpalme committed May 28, 2024
1 parent 2b62fbc commit e07dbd7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ CHANGELOG

5.3.5.0

* New: #663: Improved support for Cobertura files generated by "Microsoft CodeCoverage"
* New: #674: License can now be supplied via the REPORTGENERATOR_LICENSE environment variable

5.3.4.0
Expand Down
9 changes: 8 additions & 1 deletion src/ReportGenerator.Core/Parser/CoberturaParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ private Assembly ProcessAssembly(XElement[] modules, string assemblyName)
if (fullname.Contains("<"))
{
if (fullname.Contains("__")
|| fullname.Contains(".<>"))
{
return Tuple.Create(string.Empty, string.Empty);
}
var match = AsyncClassRegex.Match(fullname);
if (match.Success)
Expand All @@ -166,7 +172,8 @@ private Assembly ProcessAssembly(XElement[] modules, string assemblyName)
return Tuple.Create(fullname, fullname);
})
.Where(c => this.RawMode
|| (!c.Item1.Contains("$")
|| (c.Item1 != string.Empty
&& !c.Item1.Contains("$")
&& (!c.Item1.Contains("<") || GenericClassRegex.IsMatch(c.Item1))))
.Distinct()
.Where(c => this.ClassFilter.IsElementIncludedInReport(c.Item1))
Expand Down

0 comments on commit e07dbd7

Please sign in to comment.