Bump checkstyle version
[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
120 empty-blocks:
121   active: true
122   EmptyCatchBlock:
123     active: true
124     allowedExceptionNameRegex: "^(_|(ignore|expected).*)"
125   EmptyClassBlock:
126     active: true
127   EmptyDefaultConstructor:
128     active: true
129   EmptyDoWhileBlock:
130     active: true
131   EmptyElseBlock:
132     active: true
133   EmptyFinallyBlock:
134     active: true
135   EmptyForBlock:
136     active: true
137   EmptyFunctionBlock:
138     active: true
139     ignoreOverriddenFunctions: false
140   EmptyIfBlock:
141     active: true
142   EmptyInitBlock:
143     active: true
144   EmptyKtFile:
145     active: true
146   EmptySecondaryConstructor:
147     active: true
148   EmptyWhenBlock:
149     active: true
150   EmptyWhileBlock:
151     active: true
152
153 exceptions:
154   active: true
155   ExceptionRaisedInUnexpectedLocation:
156     active: false
157     methodNames: 'toString,hashCode,equals,finalize'
158   InstanceOfCheckForException:
159     active: false
160   NotImplementedDeclaration:
161     active: false
162   PrintStackTrace:
163     active: false
164   RethrowCaughtException:
165     active: false
166   ReturnFromFinally:
167     active: false
168   SwallowedException:
169     active: false
170   ThrowingExceptionFromFinally:
171     active: false
172   ThrowingExceptionInMain:
173     active: false
174   ThrowingExceptionsWithoutMessageOrCause:
175     active: false
176     exceptions: 'IllegalArgumentException,IllegalStateException,IOException'
177   ThrowingNewInstanceOfSameException:
178     active: false
179   TooGenericExceptionCaught:
180     active: true
181     exceptionNames:
182      - ArrayIndexOutOfBoundsException
183      - Error
184      - Exception
185      - IllegalMonitorStateException
186      - NullPointerException
187      - IndexOutOfBoundsException
188      - RuntimeException
189      - Throwable
190   TooGenericExceptionThrown:
191     active: true
192     exceptionNames:
193      - Error
194      - Exception
195      - Throwable
196      - RuntimeException
197
198 formatting:
199   active: true
200   android: false
201   autoCorrect: true
202   ChainWrapping:
203     active: false
204     autoCorrect: true
205   CommentSpacing:
206     active: true
207     autoCorrect: true
208   Filename:
209     active: true
210   FinalNewline:
211     active: true
212     autoCorrect: true
213   ImportOrdering:
214     active: true
215     autoCorrect: true
216   Indentation:
217     active: true
218     autoCorrect: true
219     indentSize: 4
220     continuationIndentSize: 4
221   MaximumLineLength:
222     active: true
223     maxLineLength: 120
224   ModifierOrdering:
225     active: true
226     autoCorrect: true
227   NoBlankLineBeforeRbrace:
228     active: true
229     autoCorrect: true
230   NoConsecutiveBlankLines:
231     active: true
232     autoCorrect: true
233   NoEmptyClassBody:
234     active: true
235     autoCorrect: true
236   NoItParamInMultilineLambda:
237     active: true
238   NoLineBreakAfterElse:
239     active: true
240     autoCorrect: true
241   NoLineBreakBeforeAssignment:
242     active: true
243     autoCorrect: true
244   NoMultipleSpaces:
245     active: true
246     autoCorrect: true
247   NoSemicolons:
248     active: true
249     autoCorrect: true
250   NoTrailingSpaces:
251     active: true
252     autoCorrect: true
253   NoUnitReturn:
254     active: true
255     autoCorrect: true
256   NoUnusedImports:
257     active: true
258     autoCorrect: true
259   NoWildcardImports:
260     active: true
261     autoCorrect: true
262   ParameterListWrapping:
263     active: false
264     autoCorrect: true
265     indentSize: 4
266   SpacingAroundColon:
267     active: true
268     autoCorrect: true
269   SpacingAroundComma:
270     active: true
271     autoCorrect: true
272   SpacingAroundCurly:
273     active: true
274     autoCorrect: true
275   SpacingAroundKeyword:
276     active: true
277     autoCorrect: true
278   SpacingAroundOperators:
279     active: true
280     autoCorrect: true
281   SpacingAroundRangeOperator:
282     active: true
283     autoCorrect: true
284   StringTemplate:
285     active: true
286     autoCorrect: true
287
288 naming:
289   active: true
290   ClassNaming:
291     active: true
292     classPattern: '[A-Z$][a-zA-Z0-9$]*'
293   EnumNaming:
294     active: true
295     enumEntryPattern: '^[A-Z][_a-zA-Z0-9]*'
296   ForbiddenClassName:
297     active: false
298     forbiddenName: ''
299   FunctionMaxLength:
300     active: false
301     maximumFunctionNameLength: 30
302   FunctionMinLength:
303     active: false
304     minimumFunctionNameLength: 3
305   FunctionNaming:
306     active: true
307     functionPattern: '^([a-z$][a-zA-Z$0-9]*)|(`.*`)$'
308     excludeClassPattern: '$^'
309   MatchingDeclarationName:
310     active: false
311   MemberNameEqualsClassName:
312     active: false
313     ignoreOverriddenFunction: true
314   ObjectPropertyNaming:
315     active: true
316     propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
317     constantPattern: '[A-Za-z][_A-Za-z0-9]*'
318   PackageNaming:
319     active: true
320     packagePattern: '^[a-z]+(\.[a-z][a-z0-9]*)*$'
321   TopLevelPropertyNaming:
322     active: true
323     constantPattern: '[A-Z][_A-Z0-9]*'
324     propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
325     privatePropertyPattern: '(_)?[A-Za-z][A-Za-z0-9]*'
326   VariableMaxLength:
327     active: false
328     maximumVariableNameLength: 64
329   VariableMinLength:
330     active: false
331     minimumVariableNameLength: 1
332   VariableNaming:
333     active: true
334     variablePattern: '[a-z][A-Za-z0-9]*'
335     privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*'
336     excludeClassPattern: '$^'
337
338 performance:
339   active: true
340   ForEachOnRange:
341     active: true
342   SpreadOperator:
343     active: true
344   UnnecessaryTemporaryInstantiation:
345     active: true
346
347 potential-bugs:
348   active: true
349   DuplicateCaseInWhenExpression:
350     active: true
351   EqualsAlwaysReturnsTrueOrFalse:
352     active: false
353   EqualsWithHashCodeExist:
354     active: true
355   ExplicitGarbageCollectionCall:
356     active: true
357   InvalidRange:
358     active: false
359   IteratorHasNextCallsNextMethod:
360     active: false
361   IteratorNotThrowingNoSuchElementException:
362     active: false
363   LateinitUsage:
364     active: false
365     excludeAnnotatedProperties: ""
366     ignoreOnClassesPattern: ""
367   UnconditionalJumpStatementInLoop:
368     active: false
369   UnreachableCode:
370     active: true
371   UnsafeCallOnNullableType:
372     active: false
373   UnsafeCast:
374     active: false
375   UselessPostfixExpression:
376     active: false
377   WrongEqualsTypeParameter:
378     active: false
379
380 style:
381   active: true
382   CollapsibleIfStatements:
383     active: false
384   DataClassContainsFunctions:
385     active: false
386     conversionFunctionPrefix: 'to'
387   EqualsNullCall:
388     active: false
389   ExpressionBodySyntax:
390     active: false
391   ForbiddenComment:
392     active: true
393     values: 'TODO:,FIXME:,STOPSHIP:'
394   ForbiddenImport:
395     active: false
396     imports: ''
397   FunctionOnlyReturningConstant:
398     active: false
399     ignoreOverridableFunction: true
400     excludedFunctions: 'describeContents'
401   LoopWithTooManyJumpStatements:
402     active: false
403     maxJumpCount: 1
404   MagicNumber:
405     active: true
406     ignoreNumbers: '-1,0,1,2'
407     ignoreHashCodeFunction: false
408     ignorePropertyDeclaration: false
409     ignoreConstantDeclaration: true
410     ignoreCompanionObjectPropertyDeclaration: true
411     ignoreAnnotation: false
412     ignoreNamedArgument: true
413     ignoreEnums: false
414   MaxLineLength:
415     active: true
416     maxLineLength: 120
417     excludePackageStatements: false
418     excludeImportStatements: false
419     excludeCommentStatements: false
420   MayBeConst:
421     active: false
422   ModifierOrder:
423     active: true
424   NestedClassesVisibility:
425     active: false
426   NewLineAtEndOfFile:
427     active: true
428   NoTabs:
429     active: false
430   OptionalAbstractKeyword:
431     active: true
432   OptionalUnit:
433     active: false
434   OptionalWhenBraces:
435     active: false
436   ProtectedMemberInFinalClass:
437     active: false
438   RedundantVisibilityModifierRule:
439     active: false
440   ReturnCount:
441     active: true
442     max: 2
443     excludedFunctions: "equals"
444   SafeCast:
445     active: true
446   SerialVersionUIDInSerializableClass:
447     active: false
448   SpacingBetweenPackageAndImports:
449     active: false
450   ThrowsCount:
451     active: true
452     max: 2
453   TrailingWhitespace:
454     active: false
455   UnnecessaryAbstractClass:
456     active: false
457   UnnecessaryInheritance:
458     active: false
459   UnnecessaryParentheses:
460     active: false
461   UntilInsteadOfRangeTo:
462     active: false
463   UnusedImports:
464     active: false
465   UnusedPrivateMember:
466     active: true
467     allowedNames: "(_.*|ignored|expected)"
468   UseDataClass:
469     active: false
470     excludeAnnotatedClasses: ""
471   UtilityClassWithPublicConstructor:
472     active: false
473   WildcardImport:
474     active: true
475     excludeImports: 'java.util.*,kotlinx.android.synthetic.*'
476
477 HvVesCustomRules:
478   active: true
479   SuboptimalLoggerUsage:
480     active: true