Closed
Description
Your environment
Which OS do you use?
Ubuntu 20.04
Which version of GHC do you use and how did you install it?
9.2.8 form ghcup
Which LSP client (editor/plugin) do you use?
helix
Which version of HLS do you use and how did you install it?
2.4.0.0 from ghcup
Have you configured HLS in any way (especially: a hie.yaml
file)?
I have a hie.yaml
file, but I don't think it's relevant to this issue.
What's wrong?
I have added this line to my .hlint.yaml
file:
- error: {name: Avoid restricted module}
When running hlint
I correctly get:
src/Domain/EntityEvent.hs:8:1-24: Error: Avoid restricted module
Found:
import Infrastructure.DB
Note: may break the code
1 error
HLS reports the same issue but with severity: 3
, making it render as a suggestion instead of an error in my editor:
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"code":"Avoid restricted module","message":"Avoid restricted module\nFound:\n import Infrastructure.DB ( foo )\nmay break the code\n","range":{"end":{"character":30,"line":7},"start":{"character":0,"line":7}},"severity":3,"source":"hlint"}],"uri":".../src/Domain/EntityEvent.hs","version":1}}
Is this something that's not supported (yet)? Is it possible that it's hlint
's fault instead?
Thanks