Skip to content

Improvement in Code coverage reporting #1368

@Blebowski

Description

@Blebowski

Hi, I have couple of minor proposals on the code coverage report format:

  1. Code coverage reports for multi-line expression don't contain following:
  • Highlight the expression the bins are related to
  • Markers for RHS and LHS

E.g.

Image

It is difficult to assess which subexpression this is actually talking about. Having the markers drawn in a way that would span multiple lines would be very convenient. Having the background highlight would be nice too.

  1. The "code sample" is always drawn with the leading spaces (the same as in the original code).
    If the code is only part of expression that is indented, this is quite confusing:
Image

I think it would be better if a single code-sample had the common leading white-spaces removed.

  1. During coverage reporting, the "average" coverage is not printed to the command line.
    This would be usefull for parsing in CI environments like Gitlab where one can use coverage keyword and parse
    one single number that indicates the coverage.

  2. Rounding errors in code coverage reporting cause percentage to be rounded towards nearest value, while the background color is (correctly) taken from "floored" value:

Image
  1. The coverage report could get some nicer styling, e.g. pick some better css with some background, nicer fonts, etc... The coverage is now fairly advanced in functionalities, so bit of "UI improvement" may be handy. Nothing too fancy. I believe using different font than default will help.

I can get to implementing this in some time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions