Page MenuHomePhabricator

phpunit-patch-coverage should not consider doc blocks in its coverable line count
Closed, DeclinedPublic


(Moved from T101544#4016381)

  • Removing code from a method that is covered, without doing anything else, results in an overall decrease. This is somewhat unfair, but understandable due to how the percentage is calculated based on lines covered (not methods or classes).
  • Removing comments from a method that is covered, even if in the doc comment (not the function body), results in an overall decrease. This one doesn't quite make sense. I'm not sure why doc blocks (or any comments) count towards the total. As I understand it PHPUnit/XDebug does differentiate between coverable lines and non-coverable lines (green/red vs white). It'd be nice if we can fix this somehow.

Event Timeline

Krinkle created this task.Mar 2 2018, 2:59 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 2 2018, 2:59 AM
Krinkle updated the task description. (Show Details)Mar 2 2018, 3:00 AM
Legoktm closed this task as Declined.Apr 28 2018, 9:21 AM

So...I'm going to decline this, because deciding what lines should be counted is the responsibility of phpunit, not phpunit-patch-coverage. If there's something weird going on with that, a link to the patch would be helpful in debugging. :)