-
Notifications
You must be signed in to change notification settings - Fork 49
/
.hlint.yaml
64 lines (49 loc) · 1.58 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
63
64
# Don't recommend LambdaCase
- ignore: {name: Use lambda-case}
# Allow identifiers like @c_frobnicateTheBlerch@.
- ignore: {name: Use camelCase}
# Discourage point-free style.
- ignore: {name: Eta reduce}
# Allow one-statement do blocks.
- ignore: {name: Redundant do}
# > (`f` "something") # NO
# > (\x -> f x "something") # YES
- ignore: {name: Avoid lambda}
# Allow @Set.union x y@ instead of @x `Set.union` y@.
- ignore: {name: Use infix}
# Allow explicit export of multiple modules without the
# import/export shortcut.
- ignore: {name: Use import/export shortcut}
# Let the branches of @if@ have some redundancy:
# > if pred x then return x else return y
# > return (if pred x then x else y)
- ignore: {name: Too strict if}
# join is a bit obscure
- ignore: {name: Use join}
# "when (not x)" is just as clear as "unless x"
- ignore: {name: Use unless}
# uncurry doesn't increase readability
- ignore: {name: Use uncurry}
# Arrows are too obscure to recommend
- ignore: {name: Use &&&}
# tuple sections don't increase readability
- ignore: {name: Use tuple-section}
# foldl' is almost always what you want
- warn: {
lhs: foldl,
rhs: foldl',
note: "Use foldl', which is strict, to avoid space leaks. https://fburl.com/fo\
ldl"
}
- warn: {
lhs: fromJust,
rhs: "fromMaybe (error \"your descriptive error message\")",
note: "Avoid usage of partial functions. https://fburl.com/partial-functions"
}
# Discourage point-free style:
- warn: {
lhs: f . g $ x,
rhs: f $ g $ x,
name: Point-free style,
note: "Don't overuse the point-free style: https://fburl.com/wiki/hdhaxhbm"
}