Closed chrislf closed 4 years ago
Please post some representative samples of hlint
messages with the new formats.
Sure!
Input file:
f x =
map
id
x
g h x = head (sortBy h x)
Hlint v3.1.6 results:
$ hlint data/GLTest.hs
data/GLTest.hs:(1,1)-(4,5): Warning: Eta reduce
Found:
f x = map id x
Perhaps:
f = map id
data/GLTest.hs:(2,3)-(3,6): Warning: Redundant map
Found:
map id
Perhaps:
id
data/GLTest.hs:6:9-25: Warning: Use minimumBy
Found:
head (sortBy h x)
Perhaps:
minimumBy h x
3 hints
Normally having ranges like this would allow writing a GetHighlightRegex()
function, but making it survive switching back and forth between spaces and tabs is not trivial. I suppose your patch will do, please make a pull request.
PR submitted: thanks!
Merged: 20fb41c.
Hlint 3 introduced column ranges and multi-line ranges into its output: https://github.com/ndmitchell/hlint/commit/42cbbe03156232757d3716b9fb5993ab2593eff3
The current hlint checker does not match these and therefore ignores them.
I have a branch with an updated errorformat which matches the new formats in addition to the old, tested with Vim 8.2.1123 against Hlint's own test files. The testing shows:
Here is the diff: https://github.com/vim-syntastic/syntastic/compare/master...chrislf:master
Do you need more testing of this change before I submit a PR?