-
Notifications
You must be signed in to change notification settings - Fork 0
/
.hlint.yaml
89 lines (73 loc) · 3.39 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
- warn: {name: Use explicit module export list}
- group: {name: dollar, enabled: true}
- group: {name: generalise, enabled: true}
- group: {name: future, enabled: true}
# Stolen from https://github.com/NorfairKing/haskell-dangerous-functions/
- functions:
- {name: unsafeDupablePerformIO, within: []} # Unsafe
- {name: unsafeInterleaveIO, within: []} # Unsafe
- {name: unsafeFixIO, within: []} # Unsafe
- {name: unsafePerformIO, within: []} # Unsafe
# _VERY_ hard to get right, use the async library instead.
#
# See also https://github.com/informatikr/hedis/issues/165 - krank:ignore-line
- {name: forkIO, within: []}
# Mostly impossible to get right, rethink what you're doing entirely.
# See also https://www.reddit.com/r/haskell/comments/jsap9r/how_dangerous_is_forkprocess/
- {name: forkProcess, within: []}
- {name: undefined, within: []} # Purposely fails. Deal with errors appropriately instead.
- {name: throw, within: []} # Don't throw from pure code, use throwIO instead.
- {name: Prelude.error, within: []}
- {name: Data.List.head, within: []} # Partial, use `listToMaybe` instead.
- {name: Data.List.tail, within: []} # Partial
- {name: Data.List.init, within: []} # Partial
- {name: Data.List.last, within: []} # Partial
- {name: 'Data.List.!!', within: []} # Partial
- {name: toEnum, within: []} # Partial
- {name: until, within: []} # Really confusing, use 'when' instead.
- {name: nub, within: []} # O(n^2)
- {name: foldl, within: []} # Lazy. Use foldl' instead.
- {name: sum, within: []} # Lazy accumulator
- {name: product, within: []} # Lazy accumulator
# Functions involving division
- {name: quot, within: []} # Partial, see https://github.com/NorfairKing/haskell-WAT#num-int
- {name: Prelude.div, within: []}
- {name: Data.Real.div, within: []}
- {name: rem, within: []}
- {name: mod, within: []}
- {name: quotRem, within: []}
- {name: divMod, within: []}
# Does unexpected things, see
# https://github.com/NorfairKing/haskell-WAT#real-double
- {name: realToFrac, within: []}
# Don't use string for command-line output.
- {name: System.IO.putChar, within: []}
- {name: System.IO.putStr, within: []}
- {name: System.IO.putStrLn, within: []}
- {name: System.IO.print, within: []}
# Don't use string for command-line input either.
- {name: System.IO.getChar, within: []}
- {name: System.IO.getLine, within: []}
- {name: System.IO.getContents, within: []} # Does lazy IO.
- {name: System.IO.interact, within: []}
- {name: System.IO.readIO, within: []}
- {name: System.IO.readLn, within: []}
# Don't use strings to interact with files
- {name: System.IO.readFile, within: []}
- {name: System.IO.writeFile, within: []}
- {name: System.IO.appendFile, within: []}
# Can succeed in dev, but fail in prod, because of encoding guessing
# It's also Lazy IO.
# See https://www.snoyman.com/blog/2016/12/beware-of-readfile/ for more info.
- {name: Data.Text.IO.readFile, within: []}
- {name: Data.Text.IO.Lazy.readFile, within: []}
- {name: fromJust, within: []} # Partial
# Does silent truncation:
# > fromIntegral (300 :: Word) :: Word8
# 44
- {name: fromIntegral, within: []}
# TODO
- {name: 'Prelude.read', within: []} # Partial, use `Text.Read.readMaybe` instead.
# Deprecated, use `pure` instead.
# See https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return
- {name: 'return', within: []}