Shows `hlint`s multi-line hint correctly, but only applies first line
metaleap opened this issue · 1 comments
metaleap commented
Random example where I noticed this:
https://github.com/metaleap/haxtatic/blob/master/src/Util.hs#L299
In terminal, hlint
on this file gives for this:
~/dev/hs/haxtatic/src/Util.hs:299:22: Suggestion: Redundant bracket
Found:
(disname, mergevalues $ disval : (duplpairs >~ snd)) :
(mergeduplfsts otherpairs)
Why not:
(disname, mergevalues $ disval : (duplpairs >~ snd)) :
mergeduplfsts otherpairs
Notice the line-breaks. vscode-haskell-linter
shows this correctly/completely:
But it applies it incompletely, first-line only:
--- potentially introducing fresh parse errors (as eg. above) into the source file for the unsuspecting/optimistic/tool-trusting coder 😏
NB I reckon it would be even neater if it could "un-format" such multi-lined/indented hints by default or by toggle ;)
KillyMXI commented
I second that.
Multiline chunk of code is replaced with only the first line from the hint.