What Do Code Coverage Warnings Mean in CodeScene?
This article explains what code coverage warnings in CodeScene mean, why they occur, and how you can resolve them. The goal is to help you understand whether the warning requires action and how to prevent it going forward.
What is a code coverage warning in CodeScene?
A code coverage warning indicates that the uploaded coverage data does not fully align with the current code analysis. In other words, CodeScene detects that the coverage reports reference files or versions of files that no longer match the repository state used in the analysis.
This does not necessarily mean that your coverage data is wrong - but it does mean that CodeScene cannot reliably correlate coverage results with the analyzed code.
What does this warning message mean?
"A significant part of the code coverage data for the repository is out of sync with the analysis…"
This warning is triggered when:
Coverage reports were uploaded a long time ago
Files referenced in those reports have changed significantly since then
Multiple uploads cover different sets of files or scopes
In the example:
One coverage upload is 212 days older than the analysis
16 out of 21 uploads are significantly affected
1 upload is severely affected
This tells us that most of the historical coverage data no longer matches the current state of the repository.
What does “out of sync” mean exactly?
"Out of sync" can mean that:
File paths no longer match
Files were renamed, moved, added, or removed
The coverage report was generated from an older commit
The scope of coverage (e.g., modules, packages) changed between uploads
As a result, CodeScene cannot accurately map coverage information to the analyzed files.
Why does CodeScene show this warning?
CodeScene expects consistency across coverage uploads. The warning appears when:
Different CI jobs upload different coverage scopes
Some uploads include only parts of the codebase
Older coverage uploads remain while the codebase evolves
The coverage tool configuration changes over time
The more the uploads differ from each other, the higher the likelihood of warnings.
Does this affect my analysis results?
Yes - partially.
When coverage data is out of sync:
Coverage metrics may be incomplete or misleading
Some files may appear uncovered even though they are tested
Coverage trends become unreliable
However, Code Health, Hotspots, and other core analyses remain unaffected. The warning is specific to coverage accuracy.
How can I resolve the warning?
The easiest and recommended solution is:
Upload a new coverage report that aligns with previous uploads
Ensure that:
The report is generated from the same branch or commit used in the analysis
The same set of files is consistently covered
File paths match the repository structure
Once CodeScene receives a coverage upload that matches the expected file set, the warning will automatically disappear.
Do the old coverage uploads need to be deleted?
Usually, no.
If future uploads are consistent, CodeScene will naturally recover without manual cleanup. Deleting old uploads is only necessary in rare cases where:
Old uploads are fundamentally incompatible
The project structure has permanently changed
What is the best practice to avoid this warning?
✔ Always generate coverage reports using the same configuration
✔ Keep coverage scope consistent between runs
✔ Upload coverage from the same CI pipeline
✔ Avoid mixing different report types or partial coverage uploads
When coverage reports consistently reference the same files, CodeScene will process them smoothly - and warnings won’t appear.
Summary
Code coverage warnings indicate inconsistency, not failure
They occur when coverage uploads don’t match the analyzed code
The fix is usually as simple as uploading a consistent, up-to-date report
Following best practices prevents the issue entirely
If you’re unsure whether your setup is correct, reviewing how and where coverage reports are generated is the best place to start.