97ba5153

Author: Tom Sydney Kerckhove <syd@cs-syd.eu>

Committer: Tom Sydney Kerckhove <NorfairKing@users.noreply.github.com>

Draw a rule's golden against the code it points at

RuleSpec had a format of its own: one tab-separated line per finding, holding
the rule id, the span, the scope key and the message. It pinned the right
things and none of them could be read. Checking that HsNoCustomEq underlines
the whole of an instance rather than its first line meant resolving 8:1-9:36
against the resource by hand, and nobody was going to, so a span covering half
of what it named would have gone in unnoticed. The empty-instance case is the
one that made this obvious: 5:1-5:19 says nothing, and `instance Eq Colour`
with a line under it says all of it.

So the goldens are now the same rendering a person gets at the end of a run,
which is what ReportSpec already goldens and for the same reason: the
rendering is the product for anyone not reading the source, so it is reviewed
like one. It brings the rule text, the note and the suppression hint with it,
which is three more things per rule that a reader of the diff can be wrong
about out loud.

What is no longer in a rule golden is the scope key. It is what a suppression
is matched on, so this does lose something, and what is left in its place is
the hint, which names the line a suppression has to go above. Whether that is
enough is the open question here: the alternative is a scope line above the
drawing, which puts two formats back in one file.

Every rule golden is reset by this, so most of the diff is the format rather
than any rule's behaviour changing. No finding moved: the suite passes on the
same spans and messages it passed on before.

Total

1h24m07s

Created Started Finished

Time to Start Worker time Duration Time to finish Idle
Config 2m37s 1s 1s 2m38s 2m37s
Eval 2m38s 25s 25s 3m03s 0s
Build 2m56s 2m40s 1h23m47s 1h26m44s 1h22m01s
Suite 2m37s 3m06s 1h24m07s 1h26m44s 1h24m39s

Timeline

Config Eval Build Compressed gap
0s2m40s2m50s3m1h25m1h25m1h25m1h25m1h25m1h26m1h26m1h26m1h26m1h26m