I would like to implement a new hlint rule that emits the following advice for left hand sides of definitions: (examples drawn from the warp-tls
package)
runTLS ×
runTLSSocket ×
TLSSettings ×
defaultTlsSettings √
tlsSettings √
tlsSettingsChain √
tlsSettingsMemory √
tlsSettingsChainMemory √
tlsSettingsRef √
tlsSettingsChainRef √
CertSettings √
tlsCredentials √
...
tlsServerHooks √
tlsServerDHEParams ×
...
WarpTLSException ×
I.e., I want to warn about identifiers that contain consecutive capitals.
Note that we can not generally make identifiers conformant automatically: SMSOTPToken
should be SmsOtpToken
, but there is no way to determine where one capitalism ends and another begins.
Is this a good idea and would anyone be interested in using this?
(Full disclosure: This is the style we want to enforce at work)