Skip to content
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

Cobertura report generation emits NaN as complexity for async functions #623

Closed
david-schneider-tfs opened this issue Sep 14, 2023 · 2 comments
Labels

Comments

@david-schneider-tfs
Copy link

Describe the bug
This might be an extension of #606. When using -reporttypes:Cobertura the resulting output file will have 'complexity="NaN"' for async functions. This appears to be a regression as it is not an issue in 4.x versions.

Looking in the report builder it looks like there is a disagreement over the method name for async functions. For example, with the attached sample file the codeElement parsed from the file has a method with the FullName of MoveNext() while the Name is AddAsync().

To Reproduce
I've attached a sample file that can be used as an input that will show the issue.
sampleCoberturaReport.txt

When that file is used as an input report, the output report will have the following:

<method name="AddAsync" signature="()" line-rate="1" branch-rate="1" complexity="NaN">
              <lines>
                <line number="51" hits="11" branch="false" />
              </lines>
            </method>
<method name="AddOneAsyncTask" signature="()" line-rate="0" branch-rate="1" complexity="NaN">
              <lines>
                <line number="55" hits="0" branch="false" />
                <line number="56" hits="0" branch="false" />
              </lines>
@danielpalme
Copy link
Owner

I fixed this problem. Next release will contain the change!

@danielpalme
Copy link
Owner

Release 5.1.26 is now available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants