Open
Description
Is your enhancement request related to a problem? Please describe.
I know of at least two locations where we check a module name for sanity, e.g. each component starts with an upper char.
The plugins hls-cabal-plugin, hls-module-name-plugin and ghcide itself (until #3779 lands) are known to do that. However, they do not share any code.
Describe the solution you'd like
Common sanity checks should be performed by everyone in the same, predictable way.
Additional context
One bug in hls-module-name-plugin #3784