"ignore: {}" interacts a bit strangely with custom hints
langston-barrett opened this issue · comments
Langston Barrett commented
On this module:
module Main where
main :: IO ()
main = undefined undefined
with this config:
- ignore: {}
- error:
name: "Only use one undefined"
lhs: "undefined undefined"
rhs: "undefined"
HLint 2.2.2 gives no hints. However, if I add this line:
- error: {name: "Only use one undefined"}
then HLint raises the appropriate error. Without the ignore: {}
, you don't need the second error:
(and you don't have to name your hint).
This isn't a show-stopper, but is a bit unexpected.
Neil Mitchell commented
Agreed, this is unexpected. The error is defining a hint, but that is considered separate to the configuration. I'd accept a patch fixing this, but it's probably not trivial.