carymrobbins/intellij-haskforce

HLint inspections should be configurable

Opened this issue · 4 comments

orome commented

In the Inspections configuration dialog I don't see any entry for Haskell. For example, when I get things like redundant $ or why not inspections, these are displayed as (too) prominent warnings, and I'd like to tone them down. But I can't locate them in the inspections settings list.

What entires in the inspections settings do these and other Haskell inspections correspond to?

orome commented

To clarify: how do I change how Haskell inspections appear (color, level), since they don't seem to be listed (or at least not identified as such) among the inspections settings.

That feedback comes directly from HLint, so you can configure it with hint files. See the HLint Manual.

It might be nice to also have this configurable from the IDE, so I'll mark this as an enhancement.

orome commented

Yeah, I guess the issue (for me) is that I still want a warning, but I want a weak warning. Hint just provides Error and Warning (and off altogether).

So in this context (given HLint constraints) what would be good is to be able to choose the correspondence between HLint "Error" and "Warning" and the levels in the IDE. E.g., for me anyway, an HLint "Error" should be an IDE "Warning" and an HLint "Warning" should be an IDE "Weak Warning".

Oh I see. That could probably be done rather easily. The HLint.Problem.createAnnotation method should check the severity and issue the appropriate warning.