Skip to content

Hlint restriction (and some other) settings not working #2592

Open
@tgiannak

Description

@tgiannak

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:

- 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 with mempty does remove all hints, so it seems that argsSettings isn't behaving as expected, which aligns with this HLint issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: hls-hlint-pluginstatus: blockedNot actionable, because blocked by upstream/GHC etc.type: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions