codecov-haskell icon indicating copy to clipboard operation
codecov-haskell copied to clipboard

Send expression level coverage report

Open killy971 opened this issue 11 years ago • 1 comments

Work branch: https://github.com/guillaume-nargeot/codecov-haskell/tree/expression-level-coverage

Some initial changes were made in a420f6f5ddeb36fade0bb2706b97f007ae512fee and 2c8ca354127912b5b6c622d4a282e065b629e843 to propagate additional information required to compute expression level coverage.

The remaining work consist in performing the following transformations:

  • split coverage entries which cover multiple lines into ones that cover only a single line
    • in the case of TopLevelEntry, discard all but the first line in case it is hit at least once
    • splitted lines will have their start column adjusted to the first non-blank character of the covered code
  • "unnest" coverage entries (see this gist for details)

Below are examples html outputs produced by hpc, which is what codecov-haskell should try to reproduce. These html reports were generated for the same peace of code, with differing variations of coverage.

No coverage at all: screen shot 2015-01-24 at 10 12 59 am

Coverage when tested with takeUntil (> 1) [] ~=? []: screen shot 2015-01-24 at 10 13 28 am

Coverage when tested with takeUntil (> 1) [2] ~=? [2]: screen shot 2015-01-24 at 10 13 42 am

Coverage when tested with takeUntil (> 1) [1, 2] ~=? [1, 2]: screen shot 2015-01-24 at 10 13 55 am

killy971 avatar Dec 07 '14 02:12 killy971

Same coverage patterns tested on multi-line if-then-else statements:

screen shot 2015-02-07 at 11 25 01 am

screen shot 2015-02-07 at 11 25 17 am

screen shot 2015-02-07 at 11 25 35 am

screen shot 2015-02-07 at 11 25 51 am

killy971 avatar Jan 26 '15 06:01 killy971