-
Notifications
You must be signed in to change notification settings - Fork 22
/
.stan.toml
69 lines (62 loc) · 1.96 KB
/
.stan.toml
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
# Partial: base/last
# On Windows
# To exclude .stack-work\dist\<hash>\build\internal\autogen\Paths_pantry.hs
[[check]]
id = "STAN-0004"
directory = ".stack-work\\dist"
type = "Exclude"
# Partial: base/last
# On Unix-like operating systems
# To exclude .stack-work/dist/<hash>/build/internal/autogen/Paths_pantry.hs
[[check]]
id = "STAN-0004"
directory = ".stack-work/dist"
type = "Exclude"
# Infinite: base/reverse
# Usage of the 'reverse' function that hangs on infinite lists
# Pantry uses Data.List.reverse in many places
[[check]]
id = "STAN-0101"
scope = "all"
type = "Exclude"
# Anti-pattern: Data.ByteString.Char8.pack
[[ignore]]
id = "OBS-STAN-0203-RDkR59-114:17"
# ✦ Description: Usage of 'pack' function that doesn't handle Unicode characters
# ✦ Category: #AntiPattern
# ✦ File: src/Hackage\Security\Client\Repository\HttpLib\HttpClient.hs
#
# 109 ┃
# 110 ┃ rangeHeader = BS.C8.pack $ "bytes=" ++ show from ++ "-" ++ show (to - 1)
# 111 ┃ ^^^^^^^^^^
# Data types with non-strict fields
# Defining lazy fields in data types can lead to unexpected space leaks
# Pantry uses lazy fields in many places
[[check]]
id = "STAN-0206"
scope = "all"
type = "Exclude"
# Anti-pattern: Slow 'length' for Text
[[ignore]]
id = "OBS-STAN-0208-gkCCTP-1150:14"
# ✦ Description: Usage of 'length' for 'Text' that runs in linear time
# ✦ Category: #AntiPattern
# ✦ File: src/Pantry.hs
#
# 1099 ┃
# 1100 ┃ isSHA1 t = T.length t == 40 && T.all isHexDigit t
# 1101 ┃ ^^^^^^^^
# Anti-pattern: Pattern matching on '_'
# Pattern matching on '_' for sum types can create maintainability issues
# Pantry uses pattern matching on '_' in many places.
[[check]]
id = "STAN-0213"
scope = "all"
type = "Exclude"
# Big tuples
# Using tuples of big size (>= 4) can decrease code readability
# In serveral places Pantry uses 4-tuples.
[[check]]
id = "STAN-0302"
scope = "all"
type = "Exclude"