-
-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Async methods show MoveNext()
instead of the real method name
#590
Comments
Thanks for your issue. Will have a look next week. |
Hmm, and there's also a difference in how it reports generics, which also mess up with the async methods... The Coverlet output:
The
This is the corresponding C# code: namespace MyNamespace {
public class MyClass<TMyArgument> {
public async Task MyAsyncMethod() {
}
}
} Note that, while the class, not the async method, is generic, the generic argument is put after the generated class name, while its parent class seems to not be generic from the XML. |
…t test --collect "Code Coverage;Format=Cobertura"'
Could you please try again with the new release 5.1.18? Your use cases should now be supported. |
When using either
dotnet-coverage
ordotnet test --collect "Code Coverage"
with output formatCobertura
, I getMoveNext()
method name instead of the real name for async methods when generating the report.I digged into this and found those tools use a slightly different syntax for the class name, which the ReportGenerator does not expect, and thus it fails to parse it:
Coverlet output:
Output of these tools:
So basically, if it wouldn't break anything else, the ReGex here should accept a dot as well, and it would work:
ReportGenerator/src/ReportGenerator.Core/Parser/CoberturaParser.cs
Line 39 in f396a74
Sample commands for repro with each tool:
Please note that the
--collect "Code Coverage"
way is now fully cross-platform, so I believe its use will increase over time, as it's built-in the .NET SDK.I'm using
dotnet-reportgenerator-globaltool
v5.1.17.The text was updated successfully, but these errors were encountered: