This repository was archived by the owner on Dec 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdetekt.yml
77 lines (71 loc) · 2.46 KB
/
detekt.yml
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
complexity:
# Packet processors are expected to have a large number of functions
# as they handle all the different packets
TooManyFunctions:
thresholdInClasses: 25
thresholdInFiles: 20
thresholdInObjects: 25
ignoreAnnotated:
- "com.jacobtread.blaze.annotations.PacketProcessor"
excludes:
# Database logic has a large amount of functions
# reducing this would reduce efficiency
- "**/com/jacobtread/relay/database/**"
# Packet processing classes are large by design.
LargeClass:
ignoreAnnotated:
- "com.jacobtread.blaze.annotations.PacketProcessor"
LongMethod:
threshold: 500
LongParameterList:
functionThreshold: 8
exceptions:
# Exceptions need to be swallowed for certain functions
# in order to prevent unhandled exceptions from escaping
SwallowedException:
active: false
# Channel read function catches "Exception" to prevent
# it from making its way up the pipeline without being
# caught. Also allows improved logging for said exception
TooGenericExceptionCaught:
ignoreFunction:
- "channelRead"
# Print stacktraces are ignored because the logger used by
# this project prints the stacktrace when logging so this
# error is a false positive
PrintStackTrace:
active: false
potential-bugs:
# Explicit Garbage collection is used at the begging on the
# application in order to garbage collect the chunk of memory
# used to set up the app which otherwise wouldn't be done till
# much later
ExplicitGarbageCollectionCall:
active: false
style:
# This detects far to many false positive for it to be a useful
# setting so this is disabled
MagicNumber:
active: false
# Comments with TO DO are nessicary to this project for describing
# what needs futher implementation and so are not an issue
ForbiddenComment:
active: false
# Wildcard imports are automatically used by Intellij IDEA when
# enough things are imported.
WildcardImport:
active: false
# Max line length is increased due to some hardcoded strings being
# too long to fit the original (120)
MaxLineLength:
maxLineLength: 150
# Maximum return count increased for functions that must make many
# checks to determine the outcome (handleLogin)
ReturnCount:
max: 5
# Original value is too strict and prevents certain things
# such as parsing while skipping invalid field possible
LoopWithTooManyJumpStatements:
maxJumpCount: 3
NewLineAtEndOfFile:
active: false