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

#864 Uncovered files should be ignored unless requested #868

Merged

Conversation

dvdoug
Copy link
Contributor

@dvdoug dvdoug commented Sep 24, 2021

for version 9

There are too many permutations of the various scenarios (includeUncoveredFiles = true|false, processUncoveredFiles = true|false, @covers passing|failing for the file, @covers passing|failing for an individual method, @codeCoverageIgnore annotations etc, multiplied by whether the file/method has been seen already or if this is the first time to sensibly try and disentangle the necessary code paths within ->append().

Therefore don't even try during the collection phase, just deal with it at report generation time instead.

@codecov
Copy link

codecov bot commented Sep 24, 2021

Codecov Report

Merging #868 (8604ff3) into 9.2 (7cecb7b) will decrease coverage by 0.15%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##                9.2     #868      +/-   ##
============================================
- Coverage     83.26%   83.10%   -0.16%     
- Complexity     1111     1116       +5     
============================================
  Files            62       62              
  Lines          3645     3652       +7     
============================================
  Hits           3035     3035              
- Misses          610      617       +7     
Impacted Files Coverage Δ
src/CodeCoverage.php 44.76% <0.00%> (-0.19%) ⬇️
src/ProcessedCodeCoverageData.php 94.00% <0.00%> (-6.00%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7cecb7b...8604ff3. Read the comment docs.

@sebastianbergmann sebastianbergmann merged commit 3ca2f86 into sebastianbergmann:9.2 Sep 25, 2021
continue 2;
}
}
unset($file);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This addition does nothing: unsetting $file does not alter $this->lineCoverage.

Commenting the whole removeFilesWithNoCoverage content still makes the tests pass

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, that's embarrassing...

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not only for you, also for me, because I reviewed this ;)

@Slamdunk Slamdunk mentioned this pull request Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants