File: hlint.in

package info (click to toggle)
golang-github-reviewdog-errorformat 0.0~git20220309.b075c45-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 900 kB
  • sloc: python: 59; xml: 13; javascript: 4; sh: 4; haskell: 3; makefile: 2
file content (262 lines) | stat: -rw-r--r-- 5,496 bytes parent folder | download | duplicates (2)
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
src/Calc.hs:11:18: Suggestion: Redundant bracket
Found:
  (eval a) + (eval b)
Perhaps:
  eval a + (eval b)

src/Calc.hs:11:18: Suggestion: Redundant bracket
Found:
  (eval a) + (eval b)
Perhaps:
  (eval a) + eval b

src/Calc.hs:12:18: Suggestion: Redundant bracket
Found:
  (eval a) * (eval b)
Perhaps:
  eval a * (eval b)

src/Calc.hs:12:18: Suggestion: Redundant bracket
Found:
  (eval a) * (eval b)
Perhaps:
  (eval a) * eval b

src/CreditCard.hs:19:19: Suggestion: Redundant bracket
Found:
  concat . (map toDigits)
Perhaps:
  concat . map toDigits

src/CreditCard.hs:22:19: Suggestion: Redundant bracket
Found:
  ((flip mod) 10) . sumDigits . doubleEveryOther . toDigits
Perhaps:
  (flip mod) 10 . sumDigits . doubleEveryOther . toDigits

src/CreditCard.hs:22:20: Suggestion: Redundant bracket
Found:
  (flip mod) 10
Perhaps:
  flip mod 10

src/Editor.hs:95:15: Suggestion: Avoid lambda
Found:
  \ l -> onBuffer $ line l
Perhaps:
  onBuffer . line

src/Fibonacci.hs:35:44: Warning: Redundant bracket
Found:
  (fooStream)
Perhaps:
  fooStream

src/Golf.hs:7:19: Suggestion: Redundant bracket
Found:
  [y | (j, y) <- (zip [1 .. ] ys), j `mod` i == 0]
Perhaps:
  [y | (j, y) <- zip [1 .. ] ys, j `mod` i == 0]

src/Golf.hs:8:8: Warning: Use map
Found:
  zipWith ith [1 .. length xs] (repeat xs)
Perhaps:
  map (\ x -> ith x xs) [1 .. length xs]

src/Golf.hs:20:57: Suggestion: Redundant $
Found:
  draw c $ maxi
Perhaps:
  draw c maxi

src/Hanoi.hs:8:23: Suggestion: Redundant bracket
Found:
  (hanoi (n - 1) from tmp to)
    ++ [(from, to)] ++ (hanoi (n - 1) tmp to from)
Perhaps:
  hanoi (n - 1) from tmp to
    ++ [(from, to)] ++ (hanoi (n - 1) tmp to from)

src/Hanoi.hs:8:52: Suggestion: Redundant bracket
Found:
  [(from, to)] ++ (hanoi (n - 1) tmp to from)
Perhaps:
  [(from, to)] ++ hanoi (n - 1) tmp to from

src/JoinList.hs:35:15: Suggestion: Move brackets to avoid $
Found:
  n > (getSize $ size jl)
Perhaps:
  n > getSize (size jl)

src/JoinList.hs:52:13: Suggestion: Move brackets to avoid $
Found:
  i > (getSize $ size a)
Perhaps:
  i > getSize (size a)

src/JoinList.hs:67:16: Warning: Use concat
Found:
  foldr (++) []
Perhaps:
  concat

src/JoinList.hs:68:5: Warning: Eta reduce
Found:
  line n b = indexJ n b
Perhaps:
  line = indexJ

src/JoinList.hs:69:43: Suggestion: Redundant bracket
Found:
  (Single (scoreString l, Size 1) l) +++ dropJ n b
Perhaps:
  Single (scoreString l, Size 1) l +++ dropJ n b

src/LogAnalysis.hs:12:1: Error: Parse error
Found:
    parseMessage :: String -> LogMessage
    parseMessage ("E":rest) =
  > parseMessage :: String -> LogMessage
    parseMessage s = fromMaybe (Unknown s) (pure fst <*> runParser logMessage s) where
        logMessage = parseError <|> parseInfo <|> parseWarn

src/Matrix.hs:16:34: Suggestion: Redundant bracket
Found:
  (Matrix 1 1 1 0) ^ n
Perhaps:
  Matrix 1 1 1 0 ^ n

src/Parser.hs:36:41: Warning: Use <|>
Found:
  maybe (g s) Just (f s)
Perhaps:
  f s <|> g s

src/Parser.hs:44:9: Suggestion: Redundant $
Found:
  State $ parseDigit
Perhaps:
  State parseDigit

src/Parser.hs:57:9: Suggestion: Redundant $
Found:
  State $ parseSpace
Perhaps:
  State parseSpace

src/Parser.hs:65:12: Suggestion: Use <$
Found:
  const () <$> many space
Perhaps:
  () <$ many space

src/Parser.hs:65:12: Warning: Use void
Found:
  const () <$> many space
Perhaps:
  Control.Monad.void (many space)

src/Parser.hs:76:6: Suggestion: Use <$
Found:
  const Add <$> (char '+')
Perhaps:
  (Add <$ char '+')

src/Parser.hs:76:6: Suggestion: Redundant bracket
Found:
  const Add <$> (char '+')
Perhaps:
  const Add <$> char '+'

src/Parser.hs:76:35: Suggestion: Use <$
Found:
  const Mul <$> (char '*')
Perhaps:
  (Mul <$ char '*')

src/Parser.hs:76:35: Suggestion: Redundant bracket
Found:
  const Mul <$> (char '*')
Perhaps:
  const Mul <$> char '*'

src/Party.hs:33:31: Suggestion: Redundant bracket
Found:
  "Total fun: " ++ (show f)
Perhaps:
  "Total fun: " ++ show f

src/Risk.hs:33:12: Warning: Avoid reverse
Found:
  reverse . sort
Perhaps:
  sortOn Data.Ord.Down
Note: Stabilizes sort order

src/Risk.hs:34:12: Warning: Avoid reverse
Found:
  reverse . sort
Perhaps:
  sortOn Data.Ord.Down
Note: Stabilizes sort order

src/Risk.hs:35:21: Suggestion: Redundant bracket
Found:
  (B.bimap length length) . partition id
Perhaps:
  B.bimap length length . partition id

src/Risk.hs:40:12: Suggestion: Redundant $
Found:
  max 3 $ (attackers b - 1)
Perhaps:
  max 3 (attackers b - 1)

src/Risk.hs:42:11: Suggestion: Redundant bracket
Found:
  (flip replicateM) die
Perhaps:
  flip replicateM die

src/StringBuffer.hs:1:1: Warning: Unused LANGUAGE pragma
Found:
  {-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
Perhaps:
  {-# LANGUAGE FlexibleInstances #-}
Note: Extension TypeSynonymInstances is implied by FlexibleInstances

src/StringBuffer.hs:12:3: Warning: Eta reduce
Found:
  replaceLine n l b
    = unlines . uncurry replaceLine' . splitAt n . lines $ b
Perhaps:
  replaceLine n l
    = unlines . uncurry replaceLine' . splitAt n . lines

src/Wholemeal.hs:6:22: Suggestion: Use section
Found:
  ((-) 2)
Perhaps:
  (2 -)

src/Wholemeal.hs:23:1: Warning: Eta reduce
Found:
  foldTree xs = foldr insert Leaf xs
Perhaps:
  foldTree = foldr insert Leaf

src/Wholemeal.hs:40:1: Warning: Eta reduce
Found:
  map' f xs = foldr (\ x acc -> f x : acc) [] xs
Perhaps:
  map' f = foldr (\ x acc -> f x : acc) []

src/Wholemeal.hs:40:13: Warning: Use map
Found:
  foldr (\ x acc -> f x : acc) []
Perhaps:
  map (\ x -> f x)

42 hints