Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Properly check for created coverage files - #838

Merged
Swatinem merged 1 commit into
mainfrom
swatinem/fix/falsy-file
Oct 31, 2024
Merged

Swatinem merged 1 commit into
mainfrom
swatinem/fix/falsy-file

Conversation

@Swatinem

Copy link
Copy Markdown
Contributor

An empty ReportFile is boolean-coerced to False, so we always need to explicitly compare it to None.

This primarily fixes the JetBrainsXML parser always emitting empty Reports. Also fixes cobertura failing on empty filenames, and other smaller fixes.


Fixes codecov/feedback#532
Fixes WORKER-P9A

An empty `ReportFile` is boolean-coerced to `False`, so we always need to explicitly compare it to `None`.

This primarily fixes the `JetBrainsXML` parser always emitting empty `Report`s.
Also fixes cobertura failing on empty filenames, and other smaller fixes.
@Swatinem
Swatinem requested a review from a team October 31, 2024 11:22
@Swatinem Swatinem self-assigned this Oct 31, 2024
@codecov

codecov Bot commented Oct 31, 2024 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 75.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 98.04%. Comparing base (f153619) to head (cea8c11).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
services/report/tests/unit/test_process.py 20.00% 8 Missing ⚠️
services/report/languages/mono.py 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #838      +/-   ##
==========================================
+ Coverage   98.02%   98.04%   +0.02%     
==========================================
  Files         442      443       +1     
  Lines       36026    36054      +28     
==========================================
+ Hits        35313    35350      +37     
+ Misses        713      704       -9     
Flag Coverage Δ
integration 98.04% <75.00%> (+0.02%) ⬆️
unit 98.04% <75.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 96.01% <90.90%> (+0.11%) ⬆️
OutsideTasks 98.06% <75.00%> (+0.04%) ⬆️
Files with missing lines Coverage Δ
services/report/languages/cobertura.py 98.05% <100.00%> (+0.03%) ⬆️
services/report/languages/gap.py 97.22% <100.00%> (ø)
services/report/languages/jetbrainsxml.py 90.62% <100.00%> (+55.14%) ⬆️
services/report/languages/lcov.py 95.00% <100.00%> (ø)
...ices/report/languages/tests/unit/test_cobertura.py 100.00% <100.00%> (ø)
...s/report/languages/tests/unit/test_jetbrainsxml.py 100.00% <100.00%> (ø)
services/report/languages/mono.py 39.28% <0.00%> (ø)
services/report/tests/unit/test_process.py 96.68% <20.00%> (-2.39%) ⬇️

@codecov-notifications

codecov-notifications Bot commented Oct 31, 2024 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 75.00000% with 9 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
services/report/tests/unit/test_process.py 20.00% 8 Missing ⚠️
services/report/languages/mono.py 0.00% 1 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #838      +/-   ##
==========================================
+ Coverage   98.02%   98.04%   +0.02%     
==========================================
  Files         442      443       +1     
  Lines       36026    36054      +28     
==========================================
+ Hits        35313    35350      +37     
+ Misses        713      704       -9     
Flag Coverage Δ
integration 98.04% <75.00%> (+0.02%) ⬆️
unit 98.04% <75.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 96.01% <90.90%> (+0.11%) ⬆️
OutsideTasks 98.06% <75.00%> (+0.04%) ⬆️
Files with missing lines Coverage Δ
services/report/languages/cobertura.py 98.05% <100.00%> (+0.03%) ⬆️
services/report/languages/gap.py 97.22% <100.00%> (ø)
services/report/languages/jetbrainsxml.py 90.62% <100.00%> (+55.14%) ⬆️
services/report/languages/lcov.py 95.00% <100.00%> (ø)
...ices/report/languages/tests/unit/test_cobertura.py 100.00% <100.00%> (ø)
...s/report/languages/tests/unit/test_jetbrainsxml.py 100.00% <100.00%> (ø)
services/report/languages/mono.py 39.28% <0.00%> (ø)
services/report/tests/unit/test_process.py 96.68% <20.00%> (-2.39%) ⬇️

@codecov-qa

codecov-qa Bot commented Oct 31, 2024 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 75.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 98.04%. Comparing base (f153619) to head (cea8c11).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
services/report/tests/unit/test_process.py 20.00% 8 Missing ⚠️
services/report/languages/mono.py 0.00% 1 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #838      +/-   ##
==========================================
+ Coverage   98.02%   98.04%   +0.02%     
==========================================
  Files         442      443       +1     
  Lines       36026    36054      +28     
==========================================
+ Hits        35313    35350      +37     
+ Misses        713      704       -9     
Flag Coverage Δ
integration 98.04% <75.00%> (+0.02%) ⬆️
unit 98.04% <75.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 96.01% <90.90%> (+0.11%) ⬆️
OutsideTasks 98.06% <75.00%> (+0.04%) ⬆️
Files with missing lines Coverage Δ
services/report/languages/cobertura.py 98.05% <100.00%> (+0.03%) ⬆️
services/report/languages/gap.py 97.22% <100.00%> (ø)
services/report/languages/jetbrainsxml.py 90.62% <100.00%> (+55.14%) ⬆️
services/report/languages/lcov.py 95.00% <100.00%> (ø)
...ices/report/languages/tests/unit/test_cobertura.py 100.00% <100.00%> (ø)
...s/report/languages/tests/unit/test_jetbrainsxml.py 100.00% <100.00%> (ø)
services/report/languages/mono.py 39.28% <0.00%> (ø)
services/report/tests/unit/test_process.py 96.68% <20.00%> (-2.39%) ⬇️

@codecov-public-qa

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 75.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 98.04%. Comparing base (f153619) to head (cea8c11).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #838      +/-   ##
==========================================
+ Coverage   98.02%   98.04%   +0.02%     
==========================================
  Files         442      443       +1     
  Lines       36026    36054      +28     
==========================================
+ Hits        35313    35350      +37     
+ Misses        713      704       -9     
Flag Coverage Δ
integration 98.04% <75.00%> (+0.02%) ⬆️
unit 98.04% <75.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
NonTestCode 96.01% <90.90%> (+0.11%) ⬆️
OutsideTasks 98.06% <75.00%> (+0.04%) ⬆️
Files Coverage Δ
services/report/languages/cobertura.py 98.05% <100.00%> (+0.03%) ⬆️
services/report/languages/gap.py 97.22% <100.00%> (ø)
services/report/languages/jetbrainsxml.py 90.62% <100.00%> (+55.14%) ⬆️
services/report/languages/lcov.py 95.00% <100.00%> (ø)
...ices/report/languages/tests/unit/test_cobertura.py 100.00% <100.00%> (ø)
...s/report/languages/tests/unit/test_jetbrainsxml.py 100.00% <100.00%> (ø)
services/report/languages/mono.py 39.28% <0.00%> (ø)
services/report/tests/unit/test_process.py 96.68% <20.00%> (-2.39%) ⬇️

@Swatinem
Swatinem added this pull request to the merge queue Oct 31, 2024
Merged via the queue into main with commit d4909ff Oct 31, 2024
@Swatinem
Swatinem deleted the swatinem/fix/falsy-file branch October 31, 2024 11:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codecov Fails to Process dotCover DetailedXML Reports

2 participants