diff --git a/config/detekt/detekt.yml b/config/detekt/detekt.yml index 944201eff1..1dcb1f9637 100644 --- a/config/detekt/detekt.yml +++ b/config/detekt/detekt.yml @@ -1,7 +1,7 @@ build: -# maxIssues: 0 + maxIssues: 0 excludeCorrectable: false -# weights: + weights: # complexity: 2 # LongParameterList: 1 # style: 1 @@ -10,6 +10,7 @@ build: 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 @@ -58,15 +59,15 @@ complexity: active: true ComplexCondition: active: true - allowedConditions: 4 + threshold: 4 ComplexInterface: active: false - allowedDefinitions: 10 + threshold: 10 includeStaticDeclarations: false includePrivateDeclarations: false CyclomaticComplexMethod: active: true - allowedComplexity: 15 + threshold: 15 ignoreSingleWhenExpression: false ignoreSimpleWhenEntries: false ignoreNestingFunctions: false @@ -76,39 +77,39 @@ complexity: ignoredLabels: [ ] LargeClass: active: true - allowedLines: 600 + threshold: 600 LongMethod: active: true - allowedLines: 60 + threshold: 60 ignoreAnnotated: [ 'Composable' ] LongParameterList: active: true - allowedFunctionParameters: 6 - allowedConstructorParameters: 10 + functionThreshold: 6 + constructorThreshold: 10 ignoreDefaultParameters: false ignoreDataClasses: true ignoreAnnotated: [ 'Composable' ] MethodOverloading: active: false - allowedOverloads: 6 + threshold: 6 NestedBlockDepth: active: true - allowedDepth: 4 + threshold: 4 StringLiteralDuplication: active: false excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] - allowedDuplications: 3 + threshold: 3 ignoreAnnotation: true - allowedWithLengthLessThan: 5 + excludeStringsWithLessThan5Characters: true ignoreStringsRegex: '$^' TooManyFunctions: active: true excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] - allowedFunctionsPerFile: 14 - allowedFunctionsPerClass: 14 - allowedFunctionsPerInterface: 14 - allowedFunctionsPerObject: 14 - allowedFunctionsPerEnum: 14 + thresholdInFiles: 14 + thresholdInClasses: 14 + thresholdInInterfaces: 14 + thresholdInObjects: 14 + thresholdInEnums: 14 ignoreDeprecated: false ignorePrivate: false ignoreOverridden: false @@ -144,7 +145,7 @@ empty-blocks: active: true EmptyInitBlock: active: true - EmptyKotlinFile: + EmptyKtFile: active: true EmptySecondaryConstructor: active: true @@ -347,11 +348,11 @@ naming: active: false excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] forbiddenName: [ ] - FunctionNameMaxLength: + FunctionMaxLength: active: false excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] maximumFunctionNameLength: 30 - FunctionNameMinLength: + FunctionMinLength: active: false excludes: [ '**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**' ] minimumFunctionNameLength: 3 @@ -465,12 +466,6 @@ potential-bugs: style: active: true - AbstractClassCanBeConcreteClass: - active: true - ignoreAnnotated: [ 'dagger.Module' ] - AbstractClassCanBeInterface: - active: true - ignoreAnnotated: [ 'dagger.Module' ] BracesOnWhenStatements: active: false BracesOnIfStatements: @@ -538,7 +533,7 @@ style: excludePackageStatements: true excludeImportStatements: true excludeCommentStatements: false - MayBeConstant: + MayBeConst: active: true ModifierOrder: active: true @@ -556,11 +551,9 @@ style: active: false ProtectedMemberInFinalClass: active: true - RangeUntilInsteadOfRangeTo: - active: false RedundantExplicitType: active: false - RedundantVisibilityModifier: + RedundantVisibilityModifierRule: active: false ReturnCount: active: true @@ -573,7 +566,7 @@ style: active: true SerialVersionUIDInSerializableClass: active: false - SpacingAfterPackageDeclaration: + SpacingBetweenPackageAndImports: active: false ThrowsCount: active: true @@ -583,6 +576,9 @@ style: UnderscoresInNumericLiterals: active: false acceptableLength: 5 + UnnecessaryAbstractClass: + active: true + ignoreAnnotated: [ 'dagger.Module' ] UnnecessaryAnnotationUseSiteTarget: active: false UnnecessaryApply: @@ -593,11 +589,13 @@ style: active: false UnnecessaryParentheses: active: false - UnusedImport: + UntilInsteadOfRangeTo: + active: false + UnusedImports: active: false UnusedPrivateClass: active: true - UnusedPrivateFunction: + UnusedPrivateMember: active: false allowedNames: '(_|ignored|expected|serialVersionUID)' UseArrayLiteralsInAnnotations: