-
Notifications
You must be signed in to change notification settings - Fork 40
/
detekt.yml
189 lines (178 loc) · 4.08 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
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
build:
maxIssues: 0
excludeCorrectable: false
weights:
# complexity: 2
# LongParameterList: 1
# style: 1
# comments: 1
config:
validation: true
# when writing own rules with new properties, exclude the property path e.g.: 'my_rule_set,.*>.*>[my_property]'
excludes: ''
processors:
active: true
exclude:
- 'DetektProgressListener'
# - 'FunctionCountProcessor'
# - 'PropertyCountProcessor'
# - 'ClassCountProcessor'
# - 'PackageCountProcessor'
# - 'KtFileCountProcessor'
console-reports:
active: true
exclude:
- 'ProjectStatisticsReport'
- 'ComplexityReport'
- 'NotificationReport'
# - 'FindingsReport'
- 'FileBasedFindingsReport'
comments:
active: false
complexity:
active: true
LongParameterList:
active: false
TooManyFunctions:
active: false
LongMethod:
active: false
CyclomaticComplexMethod:
active: false
coroutines:
active: true
GlobalCoroutineUsage:
active: true
RedundantSuspendModifier:
active: true
SleepInsteadOfDelay:
active: true
SuspendFunWithFlowReturnType:
active: true
exceptions:
active: true
NotImplementedDeclaration:
active: true
ObjectExtendsThrowable:
active: true
performance:
active: true
SpreadOperator:
active: false
excludes: [ '**/test/**', '**/androidTest/**', '**/*.Test.kt', '**/*.Spec.kt', '**/*.Spek.kt' ]
potential-bugs:
active: true
DontDowncastCollectionTypes:
active: true
ExitOutsideMain:
active: true
HasPlatformType:
active: true
IgnoredReturnValue:
active: true
ImplicitUnitReturnType:
active: true
allowExplicitReturnType: true
MapGetWithNotNullAssertionOperator:
active: true
UnconditionalJumpStatementInLoop:
active: true
UnreachableCatchBlock:
active: true
UselessPostfixExpression:
active: true
style:
active: true
CollapsibleIfStatements:
active: true
DataClassShouldBeImmutable:
active: true
EqualsOnSignatureLine:
active: true
ExpressionBodySyntax:
active: true
includeLineWrapping: false
ForbiddenComment:
active: true
comments:
- value: 'STOPSHIP'
reason: 'Forbidden STOPSHIP marker in comment, please address before shipping'
allowedPatterns: ''
LoopWithTooManyJumpStatements:
active: true
maxJumpCount: 3
MagicNumber:
active: false
excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**', '**/*.Test.kt', '**/*.Spec.kt', '**/*.Spek.kt' ]
ignoreNumbers: [ '-1', '0', '1', '2' ]
ignoreHashCodeFunction: true
ignorePropertyDeclaration: true
ignoreLocalVariableDeclaration: true
ignoreConstantDeclaration: true
ignoreCompanionObjectPropertyDeclaration: true
ignoreAnnotation: true
ignoreNamedArgument: true
ignoreEnums: true
ignoreRanges: true
MandatoryBracesLoops:
active: true
MaxLineLength:
active: true
maxLineLength: 150
excludePackageStatements: true
excludeImportStatements: true
excludeCommentStatements: false
NoTabs:
active: true
OptionalUnit:
active: true
PreferToOverPairSyntax:
active: true
RedundantExplicitType:
active: true
ReturnCount:
active: false
SpacingBetweenPackageAndImports:
active: true
ThrowsCount:
active: true
max: 5
TrailingWhitespace:
active: true
UnnecessaryLet:
active: true
UnnecessaryParentheses:
active: false
UnnecessaryAbstractClass:
ignoreAnnotated:
- Module
UntilInsteadOfRangeTo:
active: true
UnusedImports:
active: true
UnusedPrivateMember:
# We need to disable this otherwise we'd need to @Suppress all Composable previews...
active: false
UseArrayLiteralsInAnnotations:
active: true
UseCheckNotNull:
active: true
UseCheckOrError:
active: true
UseEmptyCounterpart:
active: true
UseIfEmptyOrIfBlank:
active: true
UseIsNullOrEmpty:
active: true
UseRequire:
active: true
UseRequireNotNull:
active: true
VarCouldBeVal:
active: true
naming:
FunctionNaming:
active: false
ignoreAnnotated:
- Composable