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

Cyclomatic complexity at method level is missing #797

Closed
dannyBies opened this issue Apr 7, 2020 · 2 comments · Fixed by #798
Closed

Cyclomatic complexity at method level is missing #797

dannyBies opened this issue Apr 7, 2020 · 2 comments · Fixed by #798
Labels
enhancement General enhancement request tenet-reporters Issue related to coverage output files(reporters)

Comments

@dannyBies
Copy link
Contributor

I'm trying to generate a report showing the Cyclomatic complexity of my methods, unfortunately the complexity is always empty:
image

In my coverage.cobertura.xml I can see that the complexity is calculated on the class level but not a method level:

<class name="<omitted>" filename="<omitted>" line-rate="1" branch-rate="1" complexity="5">
    <methods>
        <method name="<omitted>" signature="(System.Guid)" line-rate="1" branch-rate="1">

I was looking through the source code and noticed that in the CoberturaReporter we're not calculating the complexity and thus the value won't show up.

Is this a bug or is there something else I'm missing?

@MarcoRossignoli
Copy link
Collaborator

MarcoRossignoli commented Apr 7, 2020

Hi @dannyBies thank's for reporting this.
I think it's a missing piece right from the start, I don't know why(I started to work on coverlet after that).
Would you like to provide a PR ti fill the gap?Not obligated at all.

cc: @tonerdo

@MarcoRossignoli MarcoRossignoli added enhancement General enhancement request tenet-reporters Issue related to coverage output files(reporters) labels Apr 7, 2020
@dannyBies
Copy link
Contributor Author

I've opened a PR with the fix + test validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement General enhancement request tenet-reporters Issue related to coverage output files(reporters)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants