Skip to content

Eyesores caused by overlapping warnings/errors #1583

@santiweight

Description

@santiweight

Your environment

hls-1.0.0 on ubuntu (irrelevant afaik)

Which lsp-client do you use:
VS Code

Steps to reproduce

Code that causes the issue:

someFunc :: IO ()
someFunc = case [] of
    (1:1) -> error ""

image

When writing code that produces an error, hlint warnings are still returned along with the error. This makes it very hard to find errors and generally clutters the developer workspace. When an error is encountered, the common case is to focus on the error and not to apply linter hints, which are commonly applied after the code in question compiles.

Suggestion: filter out hlint warnings that intersect with the text span of an error.

Perhaps this isn't really possible, but for examples such as the image above, the issue is extremely pronounced and produces really bad eyesores quite commonly.

Note: some warnings, such as unused variables are useful during uncompiling code, but many of these will not intersect with errors, and many of those warnings that are useful will be redundant since only intersecting warnings are filtered.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions