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
forceCoversAnnotations not respected in Util\Test::requiresCodeCoverageDataCollection() #3701
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3701 +/- ##
============================================
- Coverage 82.79% 82.73% -0.07%
- Complexity 3755 3759 +4
============================================
Files 147 147
Lines 9911 9920 +9
============================================
+ Hits 8206 8207 +1
- Misses 1705 1713 +8
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #3701 +/- ##
============================================
- Coverage 82.79% 82.74% -0.06%
- Complexity 3755 3759 +4
============================================
Files 147 147
Lines 9911 9920 +9
============================================
+ Hits 8206 8208 +2
- Misses 1705 1712 +7
Continue to review full report at Codecov.
|
I feel that this change makes sense from a coverage performance perspective. When I'm not sure whether I have pulled the Similar to the change in 3697/3699, I have modified the existing I've updated those tests to check the Note: This does not affect the I suspect that it will be easier to merge this change before 3697/3699 and have that issue build upon the changes here. |
Thank you for your contribution. I appreciate the time you invested in preparing this pull request. However, I have decided not to merge it. |
Hi @sebastianbergmann , Thanks for your time to review this. It'd be good to understand your rationale for future reference, and to see if there is something else we can do instead. The Thanks again for your time and dedication to this project. |
The |
Thanks for the quick explanation. The documentation for
Therefore I'd argue that it the presence of the configuration setting is entirely relevant to whether code coverage data should be collected. With the setting enabled, coverage will not be generated regardless of whether or not it is collected, so what sense does it make to collect it? I see in php-code-coverage that it is possible to ignore the Thanks again for your time. |
Don't mean to bug you but I realised you may not have notifications turned on and therefore may not have seen my previous comment as I forgot to cc you. |
Hi @sebastianbergmann , As I say, it would be extremely useful to have rationale as to this decision. I feel that I have justified why it makes sense to make this change, citing project documentation which states that this is meant to be the case, and providing rationale as to why it would make sense. It is pointless to generate coverage data only to discard it completely unused. |
If you have specified the
forceCoversAnnotation
setting in your configuration, I would expect this to influence the result ofrequiresCodeCoverageDataCollection()
such that the Coverage Driver is only started if any coverage is required.It appears that the configuration value is only used at the end of the run when generating the coverage report, and is ignored when starting the driver.
Related to #3697/#3699.