coveragepy / coveragepy/coveragepy

Coverage.py not reporting complexity metrics in cobertura.xml

Open
#1,296 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug not a bug
Dominant language
Python
Stars
3.4k
Forks
525
Avg merge
18h 27m
Merged PRs (30d)
6

Description

For any of the files in my project, the cobertura.xml contains always a 0 for complexity.

I have hard time in understanding if the value is not computed by coverage.py (and probably we would prefer a NA then) or if my code has really such a low complexity :)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with a project containing Python files and inspect the generated cobertura.xml, focusing on how each file's complexity value is produced. Trace the relevant coverage.py reporting path and determine whether complexity should be calculated or represented as unavailable; done means the XML no longer misleadingly reports every value as 0.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.