-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.hlint.yaml
199 lines (170 loc) · 5.32 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# HLint configuration file
# https://github.com/ndmitchell/hlint
# Optional rules
- warn: { name: Use DerivingStrategies }
# Custom warning hints
- warn: { note: Prefer pure to reduce Monad constraint
, lhs: return x
, rhs: pure x
}
- warn: { note: Use more general Foldable typeclass instance
, lhs: maybeToList x
, rhs: toList x
}
- warn: { name: Use generalized indexing
, note: Use more general Indexable typeclass instance
, lhs: (!!)
, rhs: (!)
}
- warn: { note: Use more general custom parmap function
, lhs: parMap
, rhs: parmap
}
- warn: { name: fromList
, note: Use fromList' over fromList for correct vector allocation
, lhs: V.fromList
, rhs: V.fromList'
}
- warn: { name: Prefer fold to mconcat
, lhs: mconcat
, rhs: fold
}
- warn: { name: Prefer fold1 to sconcat
, lhs: sconcat
, rhs: fold1
}
# Custom suggestion hints
# Replace a $ b $ c with a . b $ c
- group: { name: dollar, enabled: true }
# Generalise map to fmap, ++ to <>
- group: { name: generalise, enabled: true }
# Generalise Maybe, Either functions to fold, foldMap
- group: { name: generalise-for-conciseness, enabled: true }
# The TupleSections language extension's syntax can be confusing, so we will ignore the hints
- ignore: { name: Use tuple-section }
# Reports language extensions that ARE used, but are implied by other langauge
# extensions. Since this whole implied extension idea is dodgy, we don't eschew
# the extra information regarding what extensions are currently enabled.
- ignore: { name: Unused LANGUAGE pragma }
# Ignore some builtin hint in test modules where we need to test the hint.
# These hints are inapplicable within test modules since the test-suites are
# testing the properties that the hint assumes to be true.
- ignore: { name: Evaluate
, within:
[ Bio.Character.Encodable.Dynamic.Test
, Bio.Character.Encodable.Static.Test
, Data.BitMatrix.Test
, Numeric.Extended.Natural.Test
, Numeric.Extended.Real.Test
]
}
- ignore: { name: Redundant id
, within:
[ Bio.Character.Encodable.Dynamic.Test
, Bio.Character.Encodable.Static.Test
, Data.BitMatrix.Test
, Numeric.Extended.Natural.Test
, Numeric.Extended.Real.Test
]
}
- ignore: { name: Use /=
, within:
[ Control.Evaluation.Test
, Control.Monad.Trans.Validation.Test
, System.ErrorPhase.Test
, Numeric.Cost.Test
]
}
- ignore: { name: Use >=>
, within:
[ Control.Evaluation.Test
, Control.Monad.Trans.Validation.Test
]
}
- ignore: { name: Use <$>
, within:
[ Control.Evaluation.Test
, Control.Monad.Trans.Validation.Test
]
}
- ignore: { name: Use =<<
, within:
[ Control.Evaluation.Test
, Control.Monad.Trans.Validation.Test
]
}
- ignore: { name: "Functor law"
, within:
[ Control.Evaluation.Test
, Control.Monad.Trans.Validation.Test
]
}
- ignore: { name: Strict sum
, within:
[ Data.MutualExclusionSet.Internal
, File.Format.Nexus.Parser
, Control.Evaluation.Test
, Control.Monad.Trans.Validation.Test
]
}
- ignore: { name: Use null
, within:
[ Control.Evaluation.Test
, Control.Monad.Trans.Validation.Test
]
}
- ignore: { name: "Monoid law, left identity"
, within:
[ Data.MutualExclusionSet.Test
, Numeric.Cost.Test
]
}
- ignore: { name: "Monoid law, right identity"
, within:
[ Data.MutualExclusionSet.Test
, Numeric.Cost.Test
]
}
- ignore: { name: "Use generalized indexing"
, within:
[ Data.BitMatrix.Test
]
}
# unsafePerformIO can only appear in FFI modules
- functions:
- { name: unsafePerformIO
, within:
[ Analysis.Parsimony.Dynamic.SequentialAlign.FFI
, Analysis.Parsimony.Dynamic.DirectOptimization.Pairwise.FFI
, Data.Hashable.Memoize
, Data.TCM.Memoized.FFI
, PCG.Command.Build.Evaluate
]
}
# Ignore . re-write suggestion in PCG.Command.Unification.Master
- ignore: { name: Use .
, within: PCG.Command.Read.Unification.Master
}
# Ignore if instead of case statement
- ignore: { name: Use if
, within: Data.Binary.Utility
}
# Ignore const rename suggestion
- ignore: { name: Use const
, within: Bio.Metadata.Discrete.Class
}
- ignore: { name: Reduce duplication
, within:
[ Bio.Graph.ReferenceDAG.Traversal
, Data.Alphabet.Test
]
}
- ignore: { name: Reduce duplication
, within: Bio.Graph.ReferenceDAG.Utility
}
- ignore: { name: Use <$>
, within: Bio.Graph.ReferenceDAG.Utility
}
- ignore: { name: Use camelCase
, within: TestSuite.ScriptTests
}