-
Notifications
You must be signed in to change notification settings - Fork 36
/
.hlint.yaml
62 lines (52 loc) · 1.47 KB
/
.hlint.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
- 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 don’t 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