detekt.yml (24314B)
1 build: 2 maxIssues: 0 3 excludeCorrectable: false 4 weights: 5 # complexity: 2 6 # LongParameterList: 1 7 # style: 1 8 # comments: 1 9 10 config: 11 validation: true 12 warningsAsErrors: false 13 checkExhaustiveness: false 14 # when writing own rules with new properties, exclude the property path e.g.: 'my_rule_set,.*>.*>[my_property]' 15 excludes: '' 16 17 processors: 18 active: true 19 exclude: 20 - 'DetektProgressListener' 21 # - 'KtFileCountProcessor' 22 # - 'PackageCountProcessor' 23 # - 'ClassCountProcessor' 24 # - 'FunctionCountProcessor' 25 # - 'PropertyCountProcessor' 26 # - 'ProjectComplexityProcessor' 27 # - 'ProjectCognitiveComplexityProcessor' 28 # - 'ProjectLLOCProcessor' 29 # - 'ProjectCLOCProcessor' 30 # - 'ProjectLOCProcessor' 31 # - 'ProjectSLOCProcessor' 32 # - 'LicenseHeaderLoaderExtension' 33 34 console-reports: 35 active: true 36 exclude: 37 # - 'ProjectStatisticsReport' 38 # - 'ComplexityReport' 39 # - 'NotificationReport' 40 # - 'FindingsReport' 41 # - 'FileBasedFindingsReport' 42 # - 'LiteFindingsReport' 43 44 output-reports: 45 active: true 46 exclude: 47 # - 'TxtOutputReport' 48 # - 'XmlOutputReport' 49 # - 'HtmlOutputReport' 50 # - 'MdOutputReport' 51 # - 'SarifOutputReport' 52 53 comments: 54 active: true 55 AbsentOrWrongFileLicense: 56 active: true # Enabled in https://bugzilla.mozilla.org/show_bug.cgi?id=1795140 57 licenseTemplateFile: 'license.template' 58 licenseTemplateIsRegex: false 59 CommentOverPrivateFunction: 60 active: false 61 CommentOverPrivateProperty: 62 active: false 63 DeprecatedBlockTag: 64 active: false 65 EndOfSentenceFormat: 66 active: false 67 endOfSentenceFormat: '([.?!][ \t\n\r\f<])|([.?!:]$)' 68 KDocReferencesNonPublicProperty: 69 active: false 70 excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] 71 OutdatedDocumentation: 72 active: false 73 matchTypeParameters: true 74 matchDeclarationsOrder: true 75 allowParamOnConstructorProperties: false 76 UndocumentedPublicClass: 77 active: true # Enabled in https://github.com/mozilla-mobile/android-components/issues/76 78 excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] 79 searchInNestedClass: true 80 searchInInnerClass: true 81 searchInInnerObject: true 82 searchInInnerInterface: true 83 searchInProtectedClass: false 84 ignoreDefaultCompanionObject: true 85 UndocumentedPublicFunction: 86 active: true # Enabled in https://github.com/mozilla-mobile/android-components/issues/76 87 excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] 88 searchProtectedFunction: false 89 UndocumentedPublicProperty: 90 active: false 91 excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] 92 searchProtectedProperty: false 93 94 complexity: 95 active: true 96 CognitiveComplexMethod: 97 active: true 98 threshold: 15 99 ComplexCondition: 100 active: true 101 threshold: 4 102 ComplexInterface: 103 active: false 104 threshold: 10 105 includeStaticDeclarations: false 106 includePrivateDeclarations: false 107 ignoreOverloaded: false 108 CyclomaticComplexMethod: 109 active: true 110 threshold: 18 # (Default: 15) Increased in https://github.com/mozilla-mobile/android-components/pull/10328 111 ignoreSingleWhenExpression: true # Enabled in https://github.com/mozilla-mobile/android-components/pull/3271 112 ignoreSimpleWhenEntries: false 113 ignoreNestingFunctions: false 114 nestingFunctions: 115 - 'also' 116 - 'apply' 117 - 'forEach' 118 - 'isNotNull' 119 - 'ifNull' 120 - 'let' 121 - 'run' 122 - 'use' 123 - 'with' 124 LabeledExpression: 125 active: false 126 ignoredLabels: [] 127 LargeClass: 128 active: true 129 threshold: 600 130 LongMethod: 131 active: true 132 threshold: 75 # (Default: 60) Increased in https://github.com/mozilla-mobile/android-components/issues/6350 133 LongParameterList: 134 active: true 135 functionThreshold: 8 # (Default: 6) Increased in https://bugzilla.mozilla.org/show_bug.cgi?id=1872996 136 constructorThreshold: 7 137 ignoreDefaultParameters: true # Enabled in https://github.com/mozilla-mobile/android-components/issues/10835 138 ignoreDataClasses: true 139 ignoreAnnotatedParameter: [] 140 MethodOverloading: 141 active: false 142 threshold: 6 143 NamedArguments: 144 active: false 145 threshold: 3 146 ignoreArgumentsMatchingNames: false 147 NestedBlockDepth: 148 active: true 149 threshold: 4 150 NestedScopeFunctions: 151 active: false 152 threshold: 1 153 functions: 154 - 'kotlin.apply' 155 - 'kotlin.run' 156 - 'kotlin.with' 157 - 'kotlin.let' 158 - 'kotlin.also' 159 ReplaceSafeCallChainWithRun: 160 active: false 161 StringLiteralDuplication: 162 active: false 163 excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] 164 threshold: 3 165 ignoreAnnotation: true 166 excludeStringsWithLessThan5Characters: true 167 ignoreStringsRegex: '$^' 168 TooManyFunctions: 169 active: true 170 excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] 171 thresholdInFiles: 26 # (Default: 11) Increased in https://github.com/mozilla-mobile/android-components/pull/9927 172 thresholdInClasses: 26 # (Default: 11) Increased in https://github.com/mozilla-mobile/android-components/pull/9927 173 thresholdInInterfaces: 26 # (Default: 11) Increased in https://github.com/mozilla-mobile/android-components/pull/9927 174 thresholdInObjects: 26 # (Default: 11) Increased in https://github.com/mozilla-mobile/android-components/pull/9927 175 thresholdInEnums: 11 176 ignoreDeprecated: false 177 ignorePrivate: false 178 ignoreOverridden: false 179 ignoreAnnotatedFunctions: [] 180 181 coroutines: 182 active: true 183 GlobalCoroutineUsage: 184 active: false 185 InjectDispatcher: 186 active: false # (Default: true) 187 dispatcherNames: 188 - 'IO' 189 - 'Default' 190 - 'Unconfined' 191 RedundantSuspendModifier: 192 active: false # (Default: true) 193 SleepInsteadOfDelay: 194 active: false # (Default: true) 195 SuspendFunSwallowedCancellation: 196 active: false 197 SuspendFunWithCoroutineScopeReceiver: 198 active: false 199 SuspendFunWithFlowReturnType: 200 active: false # (Default: true) 201 202 empty-blocks: 203 active: true 204 EmptyCatchBlock: 205 active: true 206 allowedExceptionNameRegex: '_|(ignore|expected).*' 207 EmptyClassBlock: 208 active: true 209 EmptyDefaultConstructor: 210 active: true 211 EmptyDoWhileBlock: 212 active: true 213 EmptyElseBlock: 214 active: true 215 EmptyFinallyBlock: 216 active: true 217 EmptyForBlock: 218 active: true 219 EmptyFunctionBlock: 220 active: true 221 ignoreOverridden: false 222 EmptyIfBlock: 223 active: true 224 EmptyInitBlock: 225 active: true 226 EmptyKtFile: 227 active: true 228 EmptySecondaryConstructor: 229 active: true 230 EmptyTryBlock: 231 active: true 232 EmptyWhenBlock: 233 active: true 234 EmptyWhileBlock: 235 active: true 236 237 exceptions: 238 active: true 239 ExceptionRaisedInUnexpectedLocation: 240 active: false # (Default: true) 241 methodNames: 242 - 'equals' 243 - 'finalize' 244 - 'hashCode' 245 - 'toString' 246 InstanceOfCheckForException: 247 active: false # (Default: true) 248 excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] 249 NotImplementedDeclaration: 250 active: false 251 ObjectExtendsThrowable: 252 active: false 253 PrintStackTrace: 254 active: true 255 RethrowCaughtException: 256 active: false # (Default: true) 257 ReturnFromFinally: 258 active: true 259 ignoreLabeled: false 260 SwallowedException: 261 active: false # (Default: true) 262 ignoredExceptionTypes: 263 - 'InterruptedException' 264 - 'MalformedURLException' 265 - 'NumberFormatException' 266 - 'ParseException' 267 allowedExceptionNameRegex: '_|(ignore|expected).*' 268 ThrowingExceptionFromFinally: 269 active: true 270 ThrowingExceptionInMain: 271 active: false 272 ThrowingExceptionsWithoutMessageOrCause: 273 active: false # (Default: true) 274 excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] 275 exceptions: 276 - 'ArrayIndexOutOfBoundsException' 277 - 'Exception' 278 - 'IllegalArgumentException' 279 - 'IllegalMonitorStateException' 280 - 'IllegalStateException' 281 - 'IndexOutOfBoundsException' 282 - 'NullPointerException' 283 - 'RuntimeException' 284 - 'Throwable' 285 ThrowingNewInstanceOfSameException: 286 active: true 287 TooGenericExceptionCaught: 288 active: true 289 excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] 290 exceptionNames: 291 - 'ArrayIndexOutOfBoundsException' 292 - 'Error' 293 - 'Exception' 294 - 'IllegalMonitorStateException' 295 - 'IndexOutOfBoundsException' 296 - 'NullPointerException' 297 - 'RuntimeException' 298 - 'Throwable' 299 allowedExceptionNameRegex: '_|(ignore|expected).*' 300 TooGenericExceptionThrown: 301 active: true 302 exceptionNames: 303 - 'Error' 304 - 'Exception' 305 - 'RuntimeException' 306 - 'Throwable' 307 308 naming: 309 active: true 310 BooleanPropertyNaming: 311 active: false 312 allowedPattern: '^(is|has|are)' 313 ClassNaming: 314 active: true 315 classPattern: '[A-Z][a-zA-Z0-9]*' 316 ConstructorParameterNaming: 317 active: true 318 parameterPattern: '[a-z][A-Za-z0-9]*' 319 privateParameterPattern: '[a-z][A-Za-z0-9]*' 320 excludeClassPattern: '$^' 321 EnumNaming: 322 active: true 323 enumEntryPattern: '[A-Z][_a-zA-Z0-9]*' 324 ForbiddenClassName: 325 active: false 326 forbiddenName: [] 327 FunctionMaxLength: 328 active: false 329 maximumFunctionNameLength: 30 330 FunctionMinLength: 331 active: false 332 minimumFunctionNameLength: 3 333 FunctionNaming: 334 active: true 335 excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] 336 functionPattern: '[a-z][a-zA-Z0-9]*' 337 excludeClassPattern: '$^' 338 ignoreAnnotated: ['Composable'] # Configuration for Compose https://github.com/mozilla-mobile/android-components/issues/11866 339 FunctionParameterNaming: 340 active: true 341 parameterPattern: '[a-z][A-Za-z0-9]*' 342 excludeClassPattern: '$^' 343 InvalidPackageDeclaration: 344 active: false # (Default: true) 345 rootPackage: '' 346 requireRootInDeclaration: false 347 LambdaParameterNaming: 348 active: false 349 parameterPattern: '[a-z][A-Za-z0-9]*|_' 350 MatchingDeclarationName: 351 active: true 352 mustBeFirst: true 353 MemberNameEqualsClassName: 354 active: false # (Default: true) 355 ignoreOverridden: true 356 NoNameShadowing: 357 active: false # (Default: true) 358 NonBooleanPropertyPrefixedWithIs: 359 active: false 360 ObjectPropertyNaming: 361 active: true 362 constantPattern: '[A-Za-z][_A-Za-z0-9]*' 363 propertyPattern: '[A-Za-z][_A-Za-z0-9]*' 364 privatePropertyPattern: '(_)?[A-Za-z][_A-Za-z0-9]*' 365 PackageNaming: 366 active: true 367 packagePattern: '[a-z]+(\.[a-z][A-Za-z0-9]*)*' 368 TopLevelPropertyNaming: 369 active: true 370 constantPattern: '[A-Z][_A-Z0-9]*' 371 propertyPattern: '[A-Za-z][_A-Za-z0-9]*' 372 privatePropertyPattern: '_?[A-Za-z][_A-Za-z0-9]*' 373 VariableMaxLength: 374 active: false 375 maximumVariableNameLength: 64 376 VariableMinLength: 377 active: false 378 minimumVariableNameLength: 1 379 VariableNaming: 380 active: true 381 variablePattern: '[a-z][A-Za-z0-9]*' 382 privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*' 383 excludeClassPattern: '$^' 384 385 performance: 386 active: true 387 ArrayPrimitive: 388 active: true 389 CouldBeSequence: 390 active: false 391 threshold: 3 392 ForEachOnRange: 393 active: true 394 excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] 395 SpreadOperator: 396 active: true 397 excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] 398 UnnecessaryPartOfBinaryExpression: 399 active: false 400 UnnecessaryTemporaryInstantiation: 401 active: true 402 403 potential-bugs: 404 active: true 405 AvoidReferentialEquality: 406 active: false # (Default: true) 407 forbiddenTypePatterns: 408 - 'kotlin.String' 409 CastNullableToNonNullableType: 410 active: false 411 CastToNullableType: 412 active: false 413 Deprecation: 414 active: false 415 DontDowncastCollectionTypes: 416 active: false 417 DoubleMutabilityForCollection: 418 active: true 419 mutableTypes: 420 - 'kotlin.collections.MutableList' 421 - 'kotlin.collections.MutableMap' 422 - 'kotlin.collections.MutableSet' 423 - 'java.util.ArrayList' 424 - 'java.util.LinkedHashSet' 425 - 'java.util.HashSet' 426 - 'java.util.LinkedHashMap' 427 - 'java.util.HashMap' 428 ElseCaseInsteadOfExhaustiveWhen: 429 active: false 430 ignoredSubjectTypes: [] 431 EqualsAlwaysReturnsTrueOrFalse: 432 active: true 433 EqualsWithHashCodeExist: 434 active: true 435 ExitOutsideMain: 436 active: false 437 ExplicitGarbageCollectionCall: 438 active: true 439 HasPlatformType: 440 active: false # (Default: true) 441 IgnoredReturnValue: 442 active: false # (Default: true) 443 restrictToConfig: true 444 returnValueAnnotations: 445 - 'CheckResult' 446 - '*.CheckResult' 447 - 'CheckReturnValue' 448 - '*.CheckReturnValue' 449 ignoreReturnValueAnnotations: 450 - 'CanIgnoreReturnValue' 451 - '*.CanIgnoreReturnValue' 452 returnValueTypes: 453 - 'kotlin.sequences.Sequence' 454 - 'kotlinx.coroutines.flow.*Flow' 455 - 'java.util.stream.*Stream' 456 ignoreFunctionCall: [] 457 ImplicitDefaultLocale: 458 active: false # (Default: true) 459 ImplicitUnitReturnType: 460 active: false 461 allowExplicitReturnType: true 462 InvalidRange: 463 active: true 464 IteratorHasNextCallsNextMethod: 465 active: true 466 IteratorNotThrowingNoSuchElementException: 467 active: true 468 LateinitUsage: 469 active: false 470 excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] 471 ignoreOnClassesPattern: '' 472 MapGetWithNotNullAssertionOperator: 473 active: false # (Default: true) 474 MissingPackageDeclaration: 475 active: false 476 excludes: ['**/*.kts'] 477 NullCheckOnMutableProperty: 478 active: false 479 NullableToStringCall: 480 active: false 481 PropertyUsedBeforeDeclaration: 482 active: false 483 UnconditionalJumpStatementInLoop: 484 active: false 485 UnnecessaryNotNullCheck: 486 active: false 487 UnnecessaryNotNullOperator: 488 active: true 489 UnnecessarySafeCall: 490 active: true 491 UnreachableCatchBlock: 492 active: false # (Default: true) 493 UnreachableCode: 494 active: true 495 UnsafeCallOnNullableType: 496 active: true 497 excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**'] 498 UnsafeCast: 499 active: true 500 UnusedUnaryOperator: 501 active: false # (Default: true) 502 UselessPostfixExpression: 503 active: false # (Default: true) 504 WrongEqualsTypeParameter: 505 active: true 506 507 style: 508 active: true 509 AlsoCouldBeApply: 510 active: false 511 BracesOnIfStatements: 512 active: true # Enabled in https://github.com/mozilla-mobile/android-components/issues/1015 513 singleLine: 'consistent' # (Default: never) 514 multiLine: 'always' 515 BracesOnWhenStatements: 516 active: false 517 singleLine: 'necessary' 518 multiLine: 'consistent' 519 CanBeNonNullable: 520 active: false 521 CascadingCallWrapping: 522 active: false 523 includeElvis: true 524 ClassOrdering: 525 active: false 526 CollapsibleIfStatements: 527 active: true # Enabled in https://github.com/mozilla-mobile/android-components/pull/78 528 DataClassContainsFunctions: 529 active: false 530 conversionFunctionPrefix: 531 - 'to' 532 allowOperators: false 533 DataClassShouldBeImmutable: 534 active: false 535 DestructuringDeclarationWithTooManyEntries: 536 active: false # (Default: true) 537 maxDestructuringEntries: 3 538 DoubleNegativeLambda: 539 active: false 540 negativeFunctions: 541 - reason: 'Use `takeIf` instead.' 542 value: 'takeUnless' 543 - reason: 'Use `all` instead.' 544 value: 'none' 545 negativeFunctionNameParts: 546 - 'not' 547 - 'non' 548 EqualsNullCall: 549 active: true 550 EqualsOnSignatureLine: 551 active: false 552 ExplicitCollectionElementAccessMethod: 553 active: false 554 ExplicitItLambdaParameter: 555 active: false # (Default: true) 556 ExpressionBodySyntax: 557 active: false 558 includeLineWrapping: false 559 ForbiddenAnnotation: 560 active: false 561 annotations: 562 - reason: 'it is a java annotation. Use `Suppress` instead.' 563 value: 'java.lang.SuppressWarnings' 564 - reason: 'it is a java annotation. Use `kotlin.Deprecated` instead.' 565 value: 'java.lang.Deprecated' 566 - reason: 'it is a java annotation. Use `kotlin.annotation.MustBeDocumented` instead.' 567 value: 'java.lang.annotation.Documented' 568 - reason: 'it is a java annotation. Use `kotlin.annotation.Target` instead.' 569 value: 'java.lang.annotation.Target' 570 - reason: 'it is a java annotation. Use `kotlin.annotation.Retention` instead.' 571 value: 'java.lang.annotation.Retention' 572 - reason: 'it is a java annotation. Use `kotlin.annotation.Repeatable` instead.' 573 value: 'java.lang.annotation.Repeatable' 574 - reason: 'Kotlin does not support @Inherited annotation, see https://youtrack.jetbrains.com/issue/KT-22265' 575 value: 'java.lang.annotation.Inherited' 576 ForbiddenComment: 577 active: true 578 comments: 579 - reason: 'Forbidden FIXME todo marker in comment, please fix the problem.' 580 value: 'FIXME:' 581 - reason: 'Forbidden STOPSHIP todo marker in comment, please address the problem before shipping the code.' 582 value: 'STOPSHIP:' 583 - reason: 'Forbidden TODO todo marker in comment, please do the changes.' 584 value: 'TODO:' 585 allowedPatterns: '' 586 ForbiddenImport: 587 active: false 588 imports: [] 589 forbiddenPatterns: '' 590 ForbiddenMethodCall: 591 active: false 592 methods: 593 - reason: 'print does not allow you to configure the output stream. Use a logger instead.' 594 value: 'kotlin.io.print' 595 - reason: 'println does not allow you to configure the output stream. Use a logger instead.' 596 value: 'kotlin.io.println' 597 ForbiddenSuppress: 598 active: true 599 rules: ['LongMethod', 'CognitiveComplexMethod', 'CyclomaticComplexMethod', 'MagicNumber'] 600 ForbiddenVoid: 601 active: false # (Default: true) 602 ignoreOverridden: false 603 ignoreUsageInGenerics: false 604 FunctionOnlyReturningConstant: 605 active: true 606 ignoreOverridableFunction: true 607 ignoreActualFunction: true 608 excludedFunctions: [] 609 LoopWithTooManyJumpStatements: 610 active: false # (Default: true) 611 maxJumpCount: 1 612 MagicNumber: 613 active: true 614 excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/androidUnitTest/**', '**/androidInstrumentedTest/**', '**/jsTest/**', '**/iosTest/**', '**/*.kts'] 615 ignoreNumbers: 616 - '-1' 617 - '0' 618 - '1' 619 - '2' 620 - '60' # seconds in minute / minutes in hour 621 - '1000' # millis in second 622 ignoreHashCodeFunction: true 623 ignorePropertyDeclaration: true # Enabled for Compose in https://github.com/mozilla-mobile/android-components/issues/11864 624 ignoreLocalVariableDeclaration: true # (Default: false) Enabled in https://bugzilla.mozilla.org/show_bug.cgi?id=1987018 625 ignoreConstantDeclaration: true 626 ignoreCompanionObjectPropertyDeclaration: true 627 ignoreAnnotation: false 628 ignoreNamedArgument: true 629 ignoreEnums: true # (Default: false) Enabled in https://bugzilla.mozilla.org/show_bug.cgi?id=1987018 630 ignoreRanges: false 631 ignoreExtensionFunctions: true 632 MandatoryBracesLoops: 633 active: false 634 MaxChainedCallsOnSameLine: 635 active: false 636 maxChainedCalls: 5 637 MaxLineLength: 638 active: true 639 maxLineLength: 120 640 excludePackageStatements: true 641 excludeImportStatements: true 642 excludeCommentStatements: false 643 excludeRawStrings: true 644 MayBeConst: 645 active: true 646 ModifierOrder: 647 active: true 648 MultilineLambdaItParameter: 649 active: false 650 MultilineRawStringIndentation: 651 active: false 652 indentSize: 4 653 trimmingMethods: 654 - 'trimIndent' 655 - 'trimMargin' 656 NestedClassesVisibility: 657 active: true 658 NewLineAtEndOfFile: 659 active: true 660 NoTabs: 661 active: true # Enabled in https://github.com/mozilla-mobile/android-components/pull/78 662 NullableBooleanCheck: 663 active: false 664 ObjectLiteralToLambda: 665 active: false # (Default: true) 666 OptionalAbstractKeyword: 667 active: true 668 OptionalUnit: 669 active: false 670 PreferToOverPairSyntax: 671 active: false 672 ProtectedMemberInFinalClass: 673 active: true 674 RedundantExplicitType: 675 active: false 676 RedundantHigherOrderMapUsage: 677 active: false # (Default: true) 678 RedundantVisibilityModifierRule: 679 active: false 680 ReturnCount: 681 active: true 682 max: 3 # (Default: 2) Increased in https://github.com/mozilla-mobile/android-components/issues/3 683 excludedFunctions: 684 - 'equals' 685 excludeLabeled: false 686 excludeReturnFromLambda: true 687 excludeGuardClauses: false 688 SafeCast: 689 active: true 690 SerialVersionUIDInSerializableClass: 691 active: true 692 SpacingBetweenPackageAndImports: 693 active: true # Enabled in https://github.com/mozilla-mobile/android-components/pull/78 694 StringShouldBeRawString: 695 active: false 696 maxEscapedCharacterCount: 2 697 ignoredCharacters: [] 698 ThrowsCount: 699 active: true 700 max: 2 701 excludeGuardClauses: false 702 TrailingWhitespace: 703 active: false 704 TrimMultilineRawString: 705 active: false 706 trimmingMethods: 707 - 'trimIndent' 708 - 'trimMargin' 709 UnderscoresInNumericLiterals: 710 active: false 711 acceptableLength: 4 712 allowNonStandardGrouping: false 713 UnnecessaryAbstractClass: 714 active: true 715 UnnecessaryAnnotationUseSiteTarget: 716 active: false 717 UnnecessaryApply: 718 active: true 719 UnnecessaryBackticks: 720 active: false 721 UnnecessaryBracesAroundTrailingLambda: 722 active: false 723 UnnecessaryFilter: 724 active: false # (Default: true) 725 UnnecessaryInheritance: 726 active: true 727 UnnecessaryInnerClass: 728 active: false 729 UnnecessaryLet: 730 active: false 731 UnnecessaryParentheses: 732 active: false 733 allowForUnclearPrecedence: false 734 UntilInsteadOfRangeTo: 735 active: false 736 UnusedImports: # (Default: false) Enabled in https://bugzilla.mozilla.org/show_bug.cgi?id=1977548 737 active: true 738 UnusedParameter: 739 active: true 740 allowedNames: 'ignored|expected' 741 UnusedPrivateClass: 742 active: true 743 UnusedPrivateMember: 744 active: true 745 allowedNames: '' 746 ignoreAnnotated: ['Composable'] # Configuration for Compose https://github.com/mozilla-mobile/android-components/issues/11866 747 UnusedPrivateProperty: 748 active: true 749 allowedNames: '_|ignored|expected|serialVersionUID' 750 UseAnyOrNoneInsteadOfFind: 751 active: false # (Default: true) 752 UseArrayLiteralsInAnnotations: 753 active: false # (Default: true) 754 UseCheckNotNull: 755 active: true 756 UseCheckOrError: 757 active: false # (Default: true) 758 UseDataClass: 759 active: false 760 allowVars: false 761 UseEmptyCounterpart: 762 active: false 763 UseIfEmptyOrIfBlank: 764 active: false 765 UseIfInsteadOfWhen: 766 active: false 767 ignoreWhenContainingVariableDeclaration: false 768 UseIsNullOrEmpty: 769 active: false # (Default: true) 770 UseLet: 771 active: false 772 UseOrEmpty: 773 active: true 774 UseRequire: 775 active: true 776 UseRequireNotNull: 777 active: true 778 UseSumOfInsteadOfFlatMapSize: 779 active: false 780 UselessCallOnNotNull: 781 active: true 782 UtilityClassWithPublicConstructor: 783 active: true 784 VarCouldBeVal: 785 active: true 786 ignoreLateinitVar: false 787 WildcardImport: 788 active: true