axw/gocov

Include line number information

Opened this issue · 2 comments

This code is copied there and will be copied in gocov-xml, unless gocov test output will include line number information. It will also allow you to make text report by lines.

axw commented

I don't want to go adding redundant information to the gocov structures, but I have been considering introducing a utilities package, and something like this might fit in there.

(FWIW, I actually think it should be done differently in gocov-html, using a span to colour part of a line. i.e. just colour the statement itself, like in gocovgui).

Well, go/token is obscure, so pos-to-line converter would be very useful.

Also, this code has a bug: a.files is intended to by used as a cache, but never updated.