5af42986

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

Name an annotation pragma after what it annotates

GHC parses {-# ANN foo ... #-} as a declaration, so it is the next declaration
a comment above it attaches to. That fact carried the name "declaration", so
such a comment landed in a scope holding nothing: a suppression written there
matched no finding, a tag or a ref there connected nothing, and no rule could
say what the comment documents.

Found by running hopinion over a repository of a thousand modules, where every
Haddock above an ANN pragma was reported by a rule that asks what the comment
is about.
e2e-added-rule-is-rune2e-artifacts-are-reade2e-choices-are-found-beside-the-repositorye2e-cleane2e-dirty-package-is-judged-failinge2e-dirty-project-is-judged-failinge2e-dirty-report-is-readablee2e-disabled-rule-is-not-rune2e-incomplete-artifacts-are-a-failuree2e-judging-nothing-failse2e-named-packages-are-every-packagee2e-no-packages-is-judged-failinge2e-no-store-paths-in-findingse2e-paths-are-repository-relativee2e-withheld-facts-faile2e-wrong-source-mapping-is-a-complainthlint-checkhopinionpre-commitreleaseshellweeder-checkconfiguredevShelldefaultx86_64-linux