haskell / haskell/haskell-language-server
Hlint restriction (and some other) settings not working
- Dominant language
- Haskell
- Stars
- 3k
- Forks
- 455
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 11
Description
This differs from #1260 because even the `.hlint.yaml` file in the root of the workspace is not being used.
### Your environment
Which OS do you use:
ArchLinux, MacOS
Which LSP client (editor/plugin) do you use:
emacs+lsp-mode
Describe your project (alternative: link to the project):
GHC 8.10.7, cabal 3.6.2.0, hls 1.5.1, all installed with ghcup. hlint 3.3.4 installed with cabal.
A freshly initialized cabal project in a freshly initialized git repository with `.hlint.yaml` at the root of the repository:
```yaml
- functions:
- {name: nub, within: []}
```
### Steps to reproduce
Import and use `nub` in `src/MyLib.hs`. Running `hlint .` in the root of the repository emits a warning about the use of `nub`.
### Expected behaviour
The language server should also have a warning about the use of `nub`, as specified by the HLint configuration.
### Actual behaviour
No matter what is included in HLint configuration, the language server reports HLint warnings from the default HLint config and nothing else.
### Include debug information
Overwriting the `Hint` returned by `argsSettings` [here](https://github.com/haskell/haskell-language-server/blob/4386396624180de112d04335a75334d04781110c/plugins/hls-hlint-plugin/src/Ide/Plugin/Hlint.hs#L176) with `mempty` does remove all hints, so it seems that `argsSettings` isn't behaving as expected, which aligns with [this HLint issue](https://github.com/ndmitchell/hlint/issues/1232).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.