You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 21, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on May 21, 2025. It is now read-only.
When running tox in my machine the showed report correctly excludes those lines.
When the CI service runs tox, it also shows the correct report, with those lines excluded.
Just after running tox, the CI service runs codecov and the report uploaded to Codecov is also correct.
Broken setup
Now I remove .coveragerc file and move those lines to tox.ini:
[coverage:report]
exclude_lines =
def __repr__
Then:
When running tox in my machine the showed report correctly excludes those lines.
When the CI service runs tox, it also shows the correct report, with those lines excluded.
Just after running tox, the CI service runs codecov and the report uploaded to Codecov, this time, differs. It does not have those excluded lines, so they are reported as not covered.
Questions
Why is this happening?
Is there any way I could fix that?
Is there an option in codecov to specify the coverage configuration is in tox.ini
I'm not sure if this applies to your use case (and also I'm 4 years late), but codecov supports a section in their yaml file (codecov.yml in root directory) called ignore whcih accepts regex expressions to exclude. Mine looks similar to below to ignore django files
Activity
Ademord commentedon Jun 13, 2018
Did you manage to get this solved? :(
Peque commentedon Jun 13, 2018
@Ademord Sadly no. I am still using a separate
.coveragercfile and, as you can see, got no response from @codecov. 😕Ademord commentedon Jun 13, 2018
I fixed my issue. My use case worked when I used:
where envvar=NO would be set if i wasnt using it 😄
You can look at more details about my case here.
Peque commentedon Jun 13, 2018
@Ademord Yeah, it seems it does not apply to my use case, but thanks for sharing! 😊
mpurnell1 commentedon Oct 30, 2022
I'm not sure if this applies to your use case (and also I'm 4 years late), but codecov supports a section in their yaml file (codecov.yml in root directory) called
ignorewhcih accepts regex expressions to exclude. Mine looks similar to below to ignore django filesssbarnea commentedon Nov 26, 2022
I think that the situation it getting worse since almost everyone is moving to pyproject.toml including coveragepy.
I observed that codecov does not load the excludes from the valid codeveragepy config. ansible/ansible-lint@main/pyproject.toml#L13-L24
In my particular case I was interested about
exclude_lines