70dd7da3

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

Only name a type the site could actually use

The rule named a type from any package in the repository, which is not a fix
wherever the two packages have no dependency between them: using it would mean
editing a cabal file as well, and that is a different request from the one this
rule makes. Nine of the nineteen findings it had in one repository named a type
in a package downstream of the site, where the dependency would have had to run
backwards.

So the cabal files' build-depends are read into the project model and written to
the envelope, and the rule walks them: the site's own component for the first
hop, each package's main library after that, and names outside the repository
dropped rather than followed. That graph is what three more planned rules about
build-depends will want as well.

A newtype inside a Template Haskell bracket was also being read into the
lexicon, which had the rule name a type that does not exist and cannot be
imported. A bracket is written for a splice rather than for a reader, and this
rule already concluded only from what is written.

endsInTypeName decides every match this rule makes and no test could reach it,
so it is exported and has one. That spec also pins the short-name case the
proposal left open: no repository it was measured on names a scalar in one
syllable, and Id against userValid is the shape that would have misfired.

Total

8s

Created Started Finished

Time to Start Worker time Duration Time to finish Idle
Config 0s 0s 0s 0s 0s
Eval 0s 7s 7s 8s 0s
Build 6s 0s 1s 8s 0s
Suite 0s 8s 8s 8s 0s

Timeline

Config Eval Build
0s