build: maxIssues: 0 excludeCorrectable: false weights: # complexity: 2 # LongParameterList: 1 # style: 1 # comments: 1 config: validation: true warningsAsErrors: false # when writing own rules with new properties, exclude the property path e.g.: 'my_rule_set,.*>.*>[my_property]' excludes: '' processors: active: true exclude: - 'DetektProgressListener' # - 'KtFileCountProcessor' # - 'PackageCountProcessor' # - 'ClassCountProcessor' # - 'FunctionCountProcessor' # - 'PropertyCountProcessor' # - 'ProjectComplexityProcessor' # - 'ProjectCognitiveComplexityProcessor' # - 'ProjectLLOCProcessor' # - 'ProjectCLOCProcessor' # - 'ProjectLOCProcessor' # - 'ProjectSLOCProcessor' # - 'LicenseHeaderLoaderExtension' console-reports: active: true exclude: - 'ProjectStatisticsReport' - 'ComplexityReport' - 'NotificationReport' - 'FindingsReport' - 'FileBasedFindingsReport' # - 'LiteFindingsReport' output-reports: active: true exclude: # - 'TxtOutputReport' # - 'XmlOutputReport' # - 'HtmlOutputReport' comments: active: false AbsentOrWrongFileLicense: active: false licenseTemplateFile: 'license.template' licenseTemplateIsRegex: false CommentOverPrivateFunction: active: false CommentOverPrivateProperty: active: false DeprecatedBlockTag: active: false EndOfSentenceFormat: active: false endOfSentenceFormat: '([.?!][ \t\n\r\f<])|([.?!:]$)' KDocReferencesNonPublicProperty: active: false OutdatedDocumentation: active: false matchTypeParameters: true matchDeclarationsOrder: true allowParamOnConstructorProperties: false UndocumentedPublicClass: active: false excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] searchInNestedClass: true searchInInnerClass: true searchInInnerObject: true searchInInnerInterface: true UndocumentedPublicFunction: active: false excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] UndocumentedPublicProperty: active: false excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] complexity: active: true CognitiveComplexMethod: active: false threshold: 20 ComplexCondition: active: true threshold: 6 ComplexInterface: active: false threshold: 10 includeStaticDeclarations: false includePrivateDeclarations: false CyclomaticComplexMethod: active: false threshold: 15 ignoreSingleWhenExpression: false ignoreSimpleWhenEntries: false ignoreNestingFunctions: false nestingFunctions: - 'also' - 'apply' - 'forEach' - 'isNotNull' - 'ifNull' - 'let' - 'run' - 'use' - 'with' LabeledExpression: active: false ignoredLabels: [] LargeClass: active: false threshold: 600 LongMethod: active: true threshold: 100 LongParameterList: active: false functionThreshold: 6 constructorThreshold: 7 ignoreDefaultParameters: false ignoreDataClasses: true ignoreAnnotatedParameter: [] MethodOverloading: active: true threshold: 6 NamedArguments: active: false threshold: 3 ignoreArgumentsMatchingNames: false NestedBlockDepth: active: false threshold: 5 NestedScopeFunctions: active: false threshold: 1 functions: ['kotlin.apply', 'kotlin.run', 'kotlin.with', 'kotlin.let', 'kotlin.also'] ReplaceSafeCallChainWithRun: active: false StringLiteralDuplication: active: false excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] threshold: 3 ignoreAnnotation: true excludeStringsWithLessThan5Characters: true ignoreStringsRegex: '$^' TooManyFunctions: active: false excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] thresholdInFiles: 11 thresholdInClasses: 11 thresholdInInterfaces: 11 thresholdInObjects: 11 thresholdInEnums: 11 ignoreDeprecated: false ignorePrivate: false ignoreOverridden: false coroutines: active: true GlobalCoroutineUsage: active: true InjectDispatcher: active: false dispatcherNames: - 'IO' - 'Default' - 'Unconfined' RedundantSuspendModifier: active: true SleepInsteadOfDelay: active: true SuspendFunWithCoroutineScopeReceiver: active: true SuspendFunWithFlowReturnType: active: true empty-blocks: active: true EmptyCatchBlock: active: true allowedExceptionNameRegex: '_|(ignore|expected).*' EmptyClassBlock: active: true EmptyDefaultConstructor: active: true EmptyDoWhileBlock: active: true EmptyElseBlock: active: true EmptyFinallyBlock: active: true EmptyForBlock: active: true EmptyFunctionBlock: active: true ignoreOverridden: true EmptyIfBlock: active: true EmptyInitBlock: active: true EmptyKtFile: active: true EmptySecondaryConstructor: active: true EmptyTryBlock: active: true EmptyWhenBlock: active: true EmptyWhileBlock: active: true exceptions: active: true ExceptionRaisedInUnexpectedLocation: active: false methodNames: - 'equals' - 'finalize' - 'hashCode' - 'toString' InstanceOfCheckForException: active: true excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] NotImplementedDeclaration: active: true ObjectExtendsThrowable: active: true PrintStackTrace: active: true RethrowCaughtException: active: true ReturnFromFinally: active: true ignoreLabeled: false SwallowedException: active: true ignoredExceptionTypes: - 'InterruptedException' - 'MalformedURLException' - 'NumberFormatException' - 'ParseException' allowedExceptionNameRegex: '_|(ignore|expected).*' ThrowingExceptionFromFinally: active: true ThrowingExceptionInMain: active: false ThrowingExceptionsWithoutMessageOrCause: active: true excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] exceptions: - 'ArrayIndexOutOfBoundsException' - 'Exception' - 'IllegalArgumentException' - 'IllegalMonitorStateException' - 'IllegalStateException' - 'IndexOutOfBoundsException' - 'NullPointerException' - 'RuntimeException' - 'Throwable' ThrowingNewInstanceOfSameException: active: true TooGenericExceptionCaught: active: false excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] exceptionNames: - 'ArrayIndexOutOfBoundsException' - 'Error' - 'Exception' - 'IllegalMonitorStateException' - 'IndexOutOfBoundsException' - 'NullPointerException' - 'RuntimeException' - 'Throwable' allowedExceptionNameRegex: '_|(ignore|expected).*' TooGenericExceptionThrown: active: false exceptionNames: - 'Error' - 'Exception' - 'RuntimeException' - 'Throwable' formatting: active: false AnnotationOnSeparateLine: active: true indentSize: 4 AnnotationSpacing: active: true ArgumentListWrapping: active: true indentSize: 4 maxLineLength: 120 BlockCommentInitialStarAlignment: active: true ChainWrapping: active: true indentSize: 4 ClassName: active: false CommentSpacing: active: true CommentWrapping: active: true indentSize: 4 ContentReceiverMapping: active: false maxLineLength: 120 indentSize: 4 DiscouragedCommentLocation: active: false EnumEntryNameCase: active: true EnumWrapping: active: false intentSize: 4 Filename: active: true FinalNewline: active: true insertFinalNewLine: true FunKeywordSpacing: active: true FunctionName: active: false FunctionReturnTypeSpacing: active: true maxLineLength: 120 FunctionSignature: active: false forceMultilineWhenParameterCountGreaterOrEqualThan: 2147483647 functionBodyExpressionWrapping: 'default' maxLineLength: 120 indentSize: 4 FunctionStartOfBodySpacing: active: true FunctionTypeReferenceSpacing: active: true IfElseBracing: active: false IfElseWrapping: active: false indentSize: 4 ImportOrdering: active: true layout: '*,java.**,javax.**,kotlin.**,^' Indentation: active: true indentSize: 4 KdocWrapping: active: true indentSize: 4 MaximumLineLength: active: true maxLineLength: 120 ignoreBackTickedIdentifier: false ModifierListSpacing: active: true MultiLineIfElse: active: true indentSize: 4 MultilineExpressionWrapping: active: false indentSize: 4 NoBlankLineBeforeRbrace: active: true NoBlankLineInList: active: false NoBlankLinesInChainedMethodCalls: active: true NoConsecutiveBlankLines: active: true NoConsecutiveComments: active: false NoEmptyClassBody: active: true NoEmptyFirstLineInClassBody: active: false indentSize: 4 NoEmptyFirstLineInMethodBlock: active: true NoLineBreakAfterElse: active: true NoLineBreakBeforeAssignment: active: true NoMultipleSpaces: active: true NoSemicolons: active: true NoSingleLineBlockComment: active: false indentSize: 4 NoTrailingSpaces: active: true NoUnitReturn: active: true NoUnusedImports: active: true NoWildcardImports: active: true packagesToUseImportOnDemandProperty: 'java.util.*,kotlinx.android.synthetic.**' NullableTypeSpacing: active: true PackageName: active: true ParameterListSpacing: active: false ParameterListWrapping: active: true maxLineLength: 120 indentSize: 4 ParameterWrapping: active: true indentSize: 4 MaxLineLength: 120 PropertyName: active: false PropertyWrapping: active: true indentSize: 4 maxLineLength: 120 SpacingAroundAngleBrackets: active: true SpacingAroundColon: active: true SpacingAroundComma: active: true SpacingAroundCurly: active: true SpacingAroundDot: active: true SpacingAroundDoubleColon: active: true SpacingAroundKeyword: active: true SpacingAroundOperators: active: true SpacingAroundParens: active: true SpacingAroundRangeOperator: active: true SpacingAroundUnaryOperator: active: true SpacingBetweenDeclarationsWithAnnotations: active: true SpacingBetweenDeclarationsWithComments: active: true SpacingBetweenFunctionNameAndOpeningParenthesis: active: true StringTemplate: active: true StringTemplateIndent: active: false indentSize: 4 TrailingCommaOnCallSite: active: false useTrailingCommaOnCallSite: true TrailingCommaOnDeclarationSite: active: false useTrailingCommaOnDeclarationSite: true TryCatchFinallySpacing: active: false indentSize: 4 TypeArgumentListSpacing: active: false indentSize: 4 TypeParameterListSpacing: active: false indentSize: 4 UnnecessaryParenthesesBeforeTrailingLambda: active: true Wrapping: active: true indentSize: 4 maxLineLength: 120 libraries: active: false ForbiddenPublicDataClass: active: true ignorePackages: ['*.internal', '*.internal.*'] LibraryCodeMustSpecifyReturnType: active: true allowOmitUnit: false LibraryEntitiesShouldNotBePublic: active: true naming: active: true BooleanPropertyNaming: active: false allowedPattern: '^(is|has|are)' ClassNaming: active: true classPattern: '[A-Z][a-zA-Z0-9]*' ConstructorParameterNaming: active: true parameterPattern: '[a-z][A-Za-z0-9]*' privateParameterPattern: '[a-z][A-Za-z0-9]*' excludeClassPattern: '$^' EnumNaming: active: true enumEntryPattern: '[A-Z][_a-zA-Z0-9]*' ForbiddenClassName: active: false forbiddenName: [] FunctionMaxLength: active: false maximumFunctionNameLength: 30 FunctionMinLength: active: false minimumFunctionNameLength: 3 FunctionNaming: active: true excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] functionPattern: '[a-z][a-zA-Z0-9]*' excludeClassPattern: '$^' FunctionParameterNaming: active: true parameterPattern: '[a-z][A-Za-z0-9]*' excludeClassPattern: '$^' InvalidPackageDeclaration: active: true rootPackage: '' requireRootInDeclaration: false LambdaParameterNaming: active: true parameterPattern: '[a-z][A-Za-z0-9]*|_' MatchingDeclarationName: active: true mustBeFirst: false MemberNameEqualsClassName: active: true ignoreOverridden: true NoNameShadowing: active: true NonBooleanPropertyPrefixedWithIs: active: false ObjectPropertyNaming: active: true constantPattern: '[A-Za-z][_A-Za-z0-9]*' propertyPattern: '[A-Za-z][_A-Za-z0-9]*' privatePropertyPattern: '(_)?[A-Za-z][_A-Za-z0-9]*' PackageNaming: active: true packagePattern: '[a-z]+(\.[a-z][A-Za-z0-9]*)*' TopLevelPropertyNaming: active: true constantPattern: '[A-Z][_A-Z0-9]*' propertyPattern: '[A-Za-z][_A-Za-z0-9]*' privatePropertyPattern: '_?[A-Za-z][_A-Za-z0-9]*' VariableMaxLength: active: false maximumVariableNameLength: 64 VariableMinLength: active: false minimumVariableNameLength: 1 VariableNaming: active: true variablePattern: '[a-z][A-Za-z0-9]*' privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*' excludeClassPattern: '$^' performance: active: true ArrayPrimitive: active: true CouldBeSequence: active: false threshold: 3 ForEachOnRange: active: true excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] SpreadOperator: active: true excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] UnnecessaryPartOfBinaryExpression: active: true UnnecessaryTemporaryInstantiation: active: true potential-bugs: active: true AvoidReferentialEquality: active: true forbiddenTypePatterns: - 'kotlin.String' CastNullableToNonNullableType: active: true CastToNullableType: active: false Deprecation: active: false DontDowncastCollectionTypes: active: true DoubleMutabilityForCollection: active: true mutableTypes: - 'kotlin.collections.MutableList' - 'kotlin.collections.MutableMap' - 'kotlin.collections.MutableSet' - 'java.util.ArrayList' - 'java.util.LinkedHashSet' - 'java.util.HashSet' - 'java.util.LinkedHashMap' - 'java.util.HashMap' ElseCaseInsteadOfExhaustiveWhen: active: true ignoredSubjectTypes: [] EqualsAlwaysReturnsTrueOrFalse: active: true EqualsWithHashCodeExist: active: true ExitOutsideMain: active: true ExplicitGarbageCollectionCall: active: true HasPlatformType: active: true IgnoredReturnValue: active: false restrictToConfig: true returnValueAnnotations: - '*.CheckResult' - '*.CheckReturnValue' ignoreReturnValueAnnotations: - '*.CanIgnoreReturnValue' ignoreFunctionCall: [] ImplicitDefaultLocale: active: true ImplicitUnitReturnType: active: true allowExplicitReturnType: false InvalidRange: active: true IteratorHasNextCallsNextMethod: active: true IteratorNotThrowingNoSuchElementException: active: true LateinitUsage: active: false excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] ignoreOnClassesPattern: '' MapGetWithNotNullAssertionOperator: active: true MissingPackageDeclaration: active: true NullCheckOnMutableProperty: active: false NullableToStringCall: active: true PropertyUsedBeforeDeclaration: active: true UnconditionalJumpStatementInLoop: active: true UnnecessaryNotNullCheck: active: true UnnecessaryNotNullOperator: active: true UnnecessarySafeCall: active: true UnreachableCatchBlock: active: true UnreachableCode: active: true UnsafeCallOnNullableType: active: false UnsafeCast: active: true UnusedUnaryOperator: active: true UselessPostfixExpression: active: true WrongEqualsTypeParameter: active: true style: active: true AlsoCouldBeApply: active: true BracesOnIfStatements: active: true singleLine: 'consistent' multiLine: 'consistent' BracesOnWhenStatements: active: true singleLine: 'consistent' multiLine: 'consistent' CanBeNonNullable: active: true CascadingCallWrapping: active: false includeElvis: true ClassOrdering: active: true CollapsibleIfStatements: active: true DataClassContainsFunctions: active: false allowOperators: false conversionFunctionPrefix: ['to'] DataClassShouldBeImmutable: active: false DestructuringDeclarationWithTooManyEntries: active: false maxDestructuringEntries: 3 DoubleNegativeLambda: active: true negativeFunctions: ['takeUnless', 'none'] negativeFunctionNameParts: ['not', 'non'] EqualsNullCall: active: true EqualsOnSignatureLine: active: true ExplicitCollectionElementAccessMethod: active: true ExplicitItLambdaParameter: active: true ExpressionBodySyntax: active: true includeLineWrapping: true ForbiddenAnnotation: active: false annotations: ['java.lang.SuppressWarnings', 'java.lang.Deprecated', 'java.lang.annotation.Documented', 'java.lang.annotation.Target', 'java.lang.annotation.Retention', 'java.lang.annotation.Repeatable', 'java.lang.annotation.Inherited'] ForbiddenComment: active: true allowedPatterns: '' #comments: ['FIXME:', 'STOPSHIP:', 'TODO:'] comments: ['STOPSHIP:'] ForbiddenImport: active: false imports: [] forbiddenPatterns: '' ForbiddenMethodCall: active: true methods: ['kotlin.io.print', 'kotlin.io.println'] ForbiddenSuppress: active: false rules: [] ForbiddenVoid: active: true ignoreOverridden: false ignoreUsageInGenerics: false FunctionOnlyReturningConstant: active: true ignoreOverridableFunction: true ignoreActualFunction: true excludedFunctions: [] LoopWithTooManyJumpStatements: active: false maxJumpCount: 1 MagicNumber: active: false excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] ignoreNumbers: - '-1' - '0' - '1' - '2' ignoreHashCodeFunction: true ignorePropertyDeclaration: false ignoreLocalVariableDeclaration: false ignoreConstantDeclaration: true ignoreCompanionObjectPropertyDeclaration: true ignoreAnnotation: false ignoreNamedArgument: true ignoreEnums: false ignoreRanges: false ignoreExtensionFunctions: true MandatoryBracesLoops: active: true MaxLineLength: active: true maxLineLength: 150 excludePackageStatements: true excludeImportStatements: true excludeCommentStatements: false MayBeConst: active: true ModifierOrder: active: true MultilineLambdaItParameter: active: false MultilineRawStringIndentation: active: false indentSize: 4 trimmingMethods: ['trimIndent', 'trimMargin'] NestedClassesVisibility: active: true NewLineAtEndOfFile: active: true NoTabs: active: false NullableBooleanCheck: active: true ObjectLiteralToLambda: active: true OptionalAbstractKeyword: active: true OptionalUnit: active: true PreferToOverPairSyntax: active: true ProtectedMemberInFinalClass: active: true RedundantExplicitType: active: true RedundantHigherOrderMapUsage: active: true RedundantVisibilityModifierRule: active: true ReturnCount: active: false max: 2 excludedFunctions: ['equals'] excludeLabeled: false excludeReturnFromLambda: true excludeGuardClauses: false SafeCast: active: true SerialVersionUIDInSerializableClass: active: true SpacingBetweenPackageAndImports: active: true StringShouldBeRawString: active: false maxEscapedCharacterCount: 2 ignoredCharacters: [] ThrowsCount: active: false max: 2 excludeGuardClauses: false TrailingWhitespace: active: true TrimMultilineRawString: active: false trimmingMethods: ['trimIndent', 'trimMargin'] UnderscoresInNumericLiterals: active: false acceptableLength: 4 allowNonStandardGrouping: false UnnecessaryAbstractClass: active: true UnnecessaryAnnotationUseSiteTarget: active: false UnnecessaryApply: active: true UnnecessaryBackticks: active: false UnnecessaryBracesAroundTrailingLambda: active: true UnnecessaryFilter: active: true UnnecessaryInheritance: active: true UnnecessaryInnerClass: active: true UnnecessaryLet: active: true UnnecessaryParentheses: active: false allowForUnclearPrecedence: true UntilInsteadOfRangeTo: active: true UnusedImports: active: true UnusedParameter: active: true allowedNames: 'ignored|expected' UnusedPrivateClass: active: true UnusedPrivateMember: active: true allowedNames: '(_|ignored|expected|serialVersionUID)' UnusedPrivateProperty: active: true allowedNames: '_|ignored|expected|serialVersionUID' UseAnyOrNoneInsteadOfFind: active: true UseArrayLiteralsInAnnotations: active: true UseCheckNotNull: active: false UseCheckOrError: active: false UseDataClass: active: true allowVars: true UseEmptyCounterpart: active: true UseIfEmptyOrIfBlank: active: true UseIfInsteadOfWhen: active: true ignoreWhenContainingVariableDeclaration: false UseIsNullOrEmpty: active: true UseLet: active: true UseOrEmpty: active: true UseRequire: active: false UseRequireNotNull: active: false UseSumOfInsteadOfFlatMapSize: active: false UselessCallOnNotNull: active: true UtilityClassWithPublicConstructor: active: true VarCouldBeVal: active: true ignoreLateinitVar: false WildcardImport: active: true excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] excludeImports: - 'java.util.*'