-
Notifications
You must be signed in to change notification settings - Fork 0
/
.hlint.yaml
53 lines (44 loc) · 1.83 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
# HLint configuration file
# https://github.com/ndmitchell/hlint
- arguments: [--color=auto, "-XTypeApplications"]
# Blacklist some functions by default.
- functions:
- {name: unsafePerformIO, within: []}
- {name: unsafeCoerce, within: []}
- {name: head, within: []}
- {name: tail, within: []}
- {name: init, within: []}
- {name: last, within: []}
- {name: fromJust, within: []}
# Replace a $ b $ c with a . b $ c
- group: {name: dollar, enabled: true}
# Change the severity of the default group to warning
- warn: {group: {name: default}}
# Ignore the highly noisy module export list hint
- ignore: {name: Use module export list}
# Ignore some builtin hints
- ignore: {name: Reduce duplication}
- ignore: {name: Use DerivingStrategies}
- ignore: {name: Use tuple-section}
- ignore: {name: Use mappend}
- ignore: {name: Use infix}
- ignore: {name: Use lambda-case}
- ignore: {name: Eta reduce}
- ignore: {name: Use <$>}
- ignore: {name: Redundant id}
- ignore: {name: Avoid lambda using `infix`}
# Customized warnings
- warning: {lhs: map, rhs: fmap, name: Use fmap}
- warning: {lhs: mapM, rhs: traverse, name: Generalize mapM}
- warning: {lhs: mapM_, rhs: traverse_, name: Generalize mapM_}
- warning: {lhs: forM, rhs: for, name: Generalize forM}
- warning: {lhs: forM_, rhs: for_, name: Generalize forM_}
- warning: {lhs: sequence, rhs: sequenceA, name: Generalize sequence}
- warning: {lhs: sequence_, rhs: sequenceA_, name: Generalize sequence_}
- warning: {lhs: return, rhs: pure, name: Avoid return}
# Conveniences
- warning: {lhs: either (const a) id, rhs: fromRight a, name: use fromRight}
- warning: {lhs: either id (const a), rhs: fromLeft a, name: use fromLeft}
# Applicative style
- warning: {lhs: f <$> pure a <*> b, rhs: f a <$> b, name: Avoid redundant pure}
- warning: {lhs: f <$> pure a <* b, rhs: f a <$ b, name: Avoid redundant pure}