Open stof opened 10 years ago
If you want to view the coverage of methods, I'd recommend to take a look at the class and click the "Code Coverage" button at the top. This also shows you exactly which lines are covered and which lines aren't.
PHP Code Coverage does not compute the coverage percentage of methods - we would have to implement that and I'm not sure how useful it would be in the end. Have you tried the above and did that not work/was clumsy for some reason?
@schmittjoh I know that, but it is still more complex to find uncovered lines because it requires scrolling the whole code (and unfolding each method because https://github.com/scrutinizer-ci/scrutinizer/issues/116 is not implemented yet)
This all leads us to that I've originally posted in #117. We need a way to see what's been covered or not in a separate view and then dig deeper into uncovered files to find out what exactly.
Right now the UI looks like it wasn't having coverage information initially and was build around idea that we need to navigate through all files sorted by score and not their directory structure where all counters/totals/scores are also calculated per directory.
I've now added the unfolding if you click "Code Coverage" on classes. I agree with @aik099 that we probably still need some sort of tree view based on the directory structure.
Currently, the code coverage UI displays the coverage ratio for classes and the CRAP score for methods. While having the CRAP score is a good idea, it would be good to have the ratio as well for methods. It would make it much easier to find the uncovered code of the class (it is easier to look at the ratio than to compare try guessing it from the CRAP score as a complex covered method can still have a higher CRAP than a simpler uncovered method)