how to enable one specific ruleset?
How do I enable just the warnings/suggestions provided by the rules from one file? (https://github.com/NorfairKing/haskell-dangerous-functions/issues/18)
I tried
hlint --hint=hlint.yaml src/
but this will use hlint's built-in rules as well - I think that's the meaing of the first to lines of .. -v .. output
# Initialise of global flags... took 0.00s
# Config of data/hlint.yaml... took 0.17s
# Config of hlint.yaml... took 0.00s
# Parse of src/...
I tried to put - ignore: { } at the start, but then I get no output at all (I think that's https://github.com/ndmitchell/hlint/issues/748)
Currently, if you put - ignore: { } at the start, then you must explicitly turn on any hint you want.
In other words, this does not produce any hint:
- ignore: { }
- warn: {lhs: mapM, rhs: traverse}
You need to turn on the hint by
- ignore: { }
- warn: {name: Use traverse}
- warn: {lhs: mapM, rhs: traverse}
This is obviously redundant, and what's worse, the hint name "Use traverse" is auto-generated, and may not be obvious to whoever created the hint. I think we should make it so that whatever follows - ignore is turned on automatically.
That seems a very reasonable solution @zliu41 - patch welcome