Correct totalConnections metric
[dcaegen2/collectors/hv-ves.git] / build / hv-collector-analysis / src / main / resources / onap-detekt-config.yml
1 autoCorrect: true
2 failFast: false
3
4 test-pattern: # Configure exclusions for test sources
5   active: true
6   patterns: # Test file regexes
7     - '.*/test/.*'
8     - '.*Test.kt'
9     - '.*Spec.kt'
10   exclude-rule-sets:
11     - 'comments'
12   exclude-rules:
13     - 'NamingRules'
14     - 'WildcardImport'
15     - 'MagicNumber'
16     - 'MaxLineLength'
17     - 'LateinitUsage'
18     - 'StringLiteralDuplication'
19     - 'SpreadOperator'
20     - 'TooManyFunctions'
21     - 'ForEachOnRange'
22
23 build:
24   maxIssues: 3
25   weights:
26     # complexity: 2
27     # LongParameterList: 1
28     # style: 1
29     # comments: 1
30
31 processors:
32   active: true
33   exclude:
34   # - 'FunctionCountProcessor'
35   # - 'PropertyCountProcessor'
36   # - 'ClassCountProcessor'
37   # - 'PackageCountProcessor'
38   # - 'KtFileCountProcessor'
39
40 console-reports:
41   active: true
42   exclude:
43   #  - 'ProjectStatisticsReport'
44   #  - 'ComplexityReport'
45   #  - 'NotificationReport'
46   #  - 'FindingsReport'
47   #  - 'BuildFailureReport'
48
49 output-reports:
50   active: true
51   exclude:
52   #  - 'HtmlOutputReport'
53   #  - 'PlainOutputReport'
54   #  - 'XmlOutputReport'
55
56 comments:
57   active: true
58   CommentOverPrivateFunction:
59     active: false
60   CommentOverPrivateProperty:
61     active: false
62   EndOfSentenceFormat:
63     active: false
64     endOfSentenceFormat: ([.?!][ \t\n\r\f<])|([.?!]$)
65   UndocumentedPublicClass:
66     active: false
67     searchInNestedClass: true
68     searchInInnerClass: true
69     searchInInnerObject: true
70     searchInInnerInterface: true
71   UndocumentedPublicFunction:
72     active: false
73
74 complexity:
75   active: true
76   ComplexCondition:
77     active: true
78     threshold: 4
79   ComplexInterface:
80     active: false
81     threshold: 10
82     includeStaticDeclarations: false
83   ComplexMethod:
84     active: true
85     threshold: 10
86     ignoreSingleWhenExpression: false
87   LabeledExpression:
88     active: false
89   LargeClass:
90     active: true
91     threshold: 150
92   LongMethod:
93     active: true
94     threshold: 20
95   LongParameterList:
96     active: true
97     threshold: 6
98     ignoreDefaultParameters: false
99   MethodOverloading:
100     active: false
101     threshold: 6
102   NestedBlockDepth:
103     active: true
104     threshold: 4
105   StringLiteralDuplication:
106     active: false
107     threshold: 3
108     ignoreAnnotation: true
109     excludeStringsWithLessThan5Characters: true
110     ignoreStringsRegex: '$^'
111   TooManyFunctions:
112     active: true
113     thresholdInFiles: 11
114     thresholdInClasses: 11
115     thresholdInInterfaces: 11
116     thresholdInObjects: 11
117     thresholdInEnums: 11
118     ignoreDeprecated: false
119     ignorePrivate: false
120
121 empty-blocks:
122   active: true
123   EmptyCatchBlock:
124     active: true
125     allowedExceptionNameRegex: "^(_|(ignore|expected).*)"
126   EmptyClassBlock:
127     active: true
128   EmptyDefaultConstructor:
129     active: true
130   EmptyDoWhileBlock:
131     active: true
132   EmptyElseBlock:
133     active: true
134   EmptyFinallyBlock:
135     active: true
136   EmptyForBlock:
137     active: true
138   EmptyFunctionBlock:
139     active: true
140     ignoreOverriddenFunctions: false
141   EmptyIfBlock:
142     active: true
143   EmptyInitBlock:
144     active: true
145   EmptyKtFile:
146     active: true
147   EmptySecondaryConstructor:
148     active: true
149   EmptyWhenBlock:
150     active: true
151   EmptyWhileBlock:
152     active: true
153
154 exceptions:
155   active: true
156   ExceptionRaisedInUnexpectedLocation:
157     active: false
158     methodNames: 'toString,hashCode,equals,finalize'
159   InstanceOfCheckForException:
160     active: false
161   NotImplementedDeclaration:
162     active: false
163   PrintStackTrace:
164     active: false
165   RethrowCaughtException:
166     active: false
167   ReturnFromFinally:
168     active: false
169   SwallowedException:
170     active: false
171   ThrowingExceptionFromFinally:
172     active: false
173   ThrowingExceptionInMain:
174     active: false
175   ThrowingExceptionsWithoutMessageOrCause:
176     active: false
177     exceptions: 'IllegalArgumentException,IllegalStateException,IOException'
178   ThrowingNewInstanceOfSameException:
179     active: false
180   TooGenericExceptionCaught:
181     active: true
182     exceptionNames:
183      - ArrayIndexOutOfBoundsException
184      - Error
185      - Exception
186      - IllegalMonitorStateException
187      - NullPointerException
188      - IndexOutOfBoundsException
189      - RuntimeException
190      - Throwable
191   TooGenericExceptionThrown:
192     active: true
193     exceptionNames:
194      - Error
195      - Exception
196      - Throwable
197      - RuntimeException
198
199 formatting:
200   active: true
201   android: false
202   autoCorrect: true
203   ChainWrapping:
204     active: false
205     autoCorrect: true
206   CommentSpacing:
207     active: true
208     autoCorrect: true
209   Filename:
210     active: true
211   FinalNewline:
212     active: true
213     autoCorrect: true
214   ImportOrdering:
215     active: true
216     autoCorrect: true
217   Indentation:
218     active: true
219     autoCorrect: true
220     indentSize: 4
221     continuationIndentSize: 4
222   MaximumLineLength:
223     active: true
224     maxLineLength: 120
225   ModifierOrdering:
226     active: true
227     autoCorrect: true
228   NoBlankLineBeforeRbrace:
229     active: true
230     autoCorrect: true
231   NoConsecutiveBlankLines:
232     active: true
233     autoCorrect: true
234   NoEmptyClassBody:
235     active: true
236     autoCorrect: true
237   NoItParamInMultilineLambda:
238     active: true
239   NoLineBreakAfterElse:
240     active: true
241     autoCorrect: true
242   NoLineBreakBeforeAssignment:
243     active: true
244     autoCorrect: true
245   NoMultipleSpaces:
246     active: true
247     autoCorrect: true
248   NoSemicolons:
249     active: true
250     autoCorrect: true
251   NoTrailingSpaces:
252     active: true
253     autoCorrect: true
254   NoUnitReturn:
255     active: true
256     autoCorrect: true
257   NoUnusedImports:
258     active: true
259     autoCorrect: true
260   NoWildcardImports:
261     active: true
262     autoCorrect: true
263   ParameterListWrapping:
264     active: false
265     autoCorrect: true
266     indentSize: 4
267   SpacingAroundColon:
268     active: true
269     autoCorrect: true
270   SpacingAroundComma:
271     active: true
272     autoCorrect: true
273   SpacingAroundCurly:
274     active: true
275     autoCorrect: true
276   SpacingAroundKeyword:
277     active: true
278     autoCorrect: true
279   SpacingAroundOperators:
280     active: true
281     autoCorrect: true
282   SpacingAroundRangeOperator:
283     active: true
284     autoCorrect: true
285   StringTemplate:
286     active: true
287     autoCorrect: true
288
289 naming:
290   active: true
291   ClassNaming:
292     active: true
293     classPattern: '[A-Z$][a-zA-Z0-9$]*'
294   EnumNaming:
295     active: true
296     enumEntryPattern: '^[A-Z][_a-zA-Z0-9]*'
297   ForbiddenClassName:
298     active: false
299     forbiddenName: ''
300   FunctionMaxLength:
301     active: false
302     maximumFunctionNameLength: 30
303   FunctionMinLength:
304     active: false
305     minimumFunctionNameLength: 3
306   FunctionNaming:
307     active: true
308     functionPattern: '^([a-z$][a-zA-Z$0-9]*)|(`.*`)$'
309     excludeClassPattern: '$^'
310   MatchingDeclarationName:
311     active: false
312   MemberNameEqualsClassName:
313     active: false
314     ignoreOverriddenFunction: true
315   ObjectPropertyNaming:
316     active: true
317     propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
318     constantPattern: '[A-Za-z][_A-Za-z0-9]*'
319   PackageNaming:
320     active: true
321     packagePattern: '^[a-z]+(\.[a-z][a-z0-9]*)*$'
322   TopLevelPropertyNaming:
323     active: true
324     constantPattern: '[A-Z][_A-Z0-9]*'
325     propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
326     privatePropertyPattern: '(_)?[A-Za-z][A-Za-z0-9]*'
327   VariableMaxLength:
328     active: false
329     maximumVariableNameLength: 64
330   VariableMinLength:
331     active: false
332     minimumVariableNameLength: 1
333   VariableNaming:
334     active: true
335     variablePattern: '[a-z][A-Za-z0-9]*'
336     privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*'
337     excludeClassPattern: '$^'
338
339 performance:
340   active: true
341   ForEachOnRange:
342     active: true
343   SpreadOperator:
344     active: true
345   UnnecessaryTemporaryInstantiation:
346     active: true
347
348 potential-bugs:
349   active: true
350   DuplicateCaseInWhenExpression:
351     active: true
352   EqualsAlwaysReturnsTrueOrFalse:
353     active: false
354   EqualsWithHashCodeExist:
355     active: true
356   ExplicitGarbageCollectionCall:
357     active: true
358   InvalidRange:
359     active: false
360   IteratorHasNextCallsNextMethod:
361     active: false
362   IteratorNotThrowingNoSuchElementException:
363     active: false
364   LateinitUsage:
365     active: false
366     excludeAnnotatedProperties: ""
367     ignoreOnClassesPattern: ""
368   UnconditionalJumpStatementInLoop:
369     active: false
370   UnreachableCode:
371     active: true
372   UnsafeCallOnNullableType:
373     active: false
374   UnsafeCast:
375     active: false
376   UselessPostfixExpression:
377     active: false
378   WrongEqualsTypeParameter:
379     active: false
380
381 style:
382   active: true
383   CollapsibleIfStatements:
384     active: false
385   DataClassContainsFunctions:
386     active: false
387     conversionFunctionPrefix: 'to'
388   EqualsNullCall:
389     active: false
390   ExpressionBodySyntax:
391     active: false
392   ForbiddenComment:
393     active: true
394     values: 'TODO:,FIXME:,STOPSHIP:'
395   ForbiddenImport:
396     active: false
397     imports: ''
398   FunctionOnlyReturningConstant:
399     active: false
400     ignoreOverridableFunction: true
401     excludedFunctions: 'describeContents'
402   LoopWithTooManyJumpStatements:
403     active: false
404     maxJumpCount: 1
405   MagicNumber:
406     active: true
407     ignoreNumbers: '-1,0,1,2'
408     ignoreHashCodeFunction: false
409     ignorePropertyDeclaration: false
410     ignoreConstantDeclaration: true
411     ignoreCompanionObjectPropertyDeclaration: true
412     ignoreAnnotation: false
413     ignoreNamedArgument: true
414     ignoreEnums: false
415   MaxLineLength:
416     active: true
417     maxLineLength: 120
418     excludePackageStatements: false
419     excludeImportStatements: false
420     excludeCommentStatements: false
421   MayBeConst:
422     active: false
423   ModifierOrder:
424     active: true
425   NestedClassesVisibility:
426     active: false
427   NewLineAtEndOfFile:
428     active: true
429   NoTabs:
430     active: false
431   OptionalAbstractKeyword:
432     active: true
433   OptionalUnit:
434     active: false
435   OptionalWhenBraces:
436     active: false
437   ProtectedMemberInFinalClass:
438     active: false
439   RedundantVisibilityModifierRule:
440     active: false
441   ReturnCount:
442     active: true
443     max: 2
444     excludedFunctions: "equals"
445   SafeCast:
446     active: true
447   SerialVersionUIDInSerializableClass:
448     active: false
449   SpacingBetweenPackageAndImports:
450     active: false
451   ThrowsCount:
452     active: true
453     max: 2
454   TrailingWhitespace:
455     active: false
456   UnnecessaryAbstractClass:
457     active: false
458   UnnecessaryInheritance:
459     active: false
460   UnnecessaryParentheses:
461     active: false
462   UntilInsteadOfRangeTo:
463     active: false
464   UnusedImports:
465     active: false
466   UnusedPrivateMember:
467     active: true
468     allowedNames: "(_.*|ignored|expected)"
469   UseDataClass:
470     active: false
471     excludeAnnotatedClasses: ""
472   UtilityClassWithPublicConstructor:
473     active: false
474   WildcardImport:
475     active: true
476     excludeImports: 'java.util.*,kotlinx.android.synthetic.*'
477
478 HvVesCustomRules:
479   active: true
480   SuboptimalLoggerUsage:
481     active: false