prettyprinter/.hlint.yaml
Simon Jakobi f9faed52a4
Add module hierarchy with shorter module names (#174)
This removes -Werror from CI, since the import of
Prettyprinter.Render.Tutorials.StackMachineTutorial
results in a deprecation warning that turned out to
be very tricky to disable.

Context: #110.
2020-07-11 15:49:43 +02:00

63 lines
1.5 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

- arguments:
- --cpp-include=aux
- --cpp-define=MIN_VERSION_base=1
# Avoiding lambdas is not always a good idea if you keep in mind that GHC's
# inliner will only consider fully applied functions.
- ignore: {name: "Avoid lambda"}
# Naming can be useful
- ignore: {name: "Eta reduce"}
- ignore: {name: "Redundant lambda"}
- ignore: {name: "Use const"}
# Sometimes, it can make code more readable if underscores are allowed as a
# form of a "large" separator. For example, one might give all tests the prefix
# "test_", followed by a camel-case test name.
- ignore: {name: "Use camelCase"}
# Sometimes a »case« can be clearer
- ignore: {name: "Use fromMaybe"}
- ignore: {name: "Use if"}
# Obfuscation much?
- ignore: {name: "Use uncurry"}
- ignore: {name: "Use first"}
- ignore: {name: "Use second"}
- ignore: {name: "Use tuple-section"}
# Use LambdaCase -- we cannot, GHC-7.6+ feature
- ignore: {name: "Use lambda-case"}
# Not all 3-liners should be deduplicated
- ignore: {name: Reduce duplication, within: Prettyprinter.Render.Terminal.Internal}
# I dont like $
- error:
name: Use parentheses instead of $
lhs: f $ x
rhs: f (x)
# AMP fallout
- error:
name: generalize mapM
lhs: mapM
rhs: traverse
- error:
name: generalize mapM_
lhs: mapM_
rhs: traverse_
- error:
name: generalize forM
lhs: forM
rhs: for
- error:
name: generalize forM_
lhs: forM_
rhs: for_
- error:
name: Avoid return
lhs: return
rhs: pure