From 78f85a4a9ccf8db437d048fa4d876e2bb83c9607 Mon Sep 17 00:00:00 2001 From: Carter Jernigan Date: Thu, 28 Apr 2022 14:38:54 -0400 Subject: [PATCH] [#492] Detekt 1.20.0 --- gradle.properties | 2 +- tools/detekt.yml | 164 ++++++++-------------------------------------- 2 files changed, 28 insertions(+), 138 deletions(-) diff --git a/gradle.properties b/gradle.properties index 2b52b6e8..ac39f6cf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -70,7 +70,7 @@ ANDROID_COMPILE_SDK_VERSION=31 ANDROID_NDK_VERSION=22.1.7171670 ANDROID_GRADLE_PLUGIN_VERSION=7.1.3 -DETEKT_VERSION=1.19.0 +DETEKT_VERSION=1.20.0 DOKKA_VERSION=1.6.21 FLANK_VERSION=22.03.0 FULLADLE_VERSION=0.17.3 diff --git a/tools/detekt.yml b/tools/detekt.yml index 50127de6..dd92c930 100644 --- a/tools/detekt.yml +++ b/tools/detekt.yml @@ -36,9 +36,9 @@ console-reports: - 'ProjectStatisticsReport' - 'ComplexityReport' - 'NotificationReport' - # - 'FindingsReport' + - 'FindingsReport' - 'FileBasedFindingsReport' - - 'LiteFindingsReport' + # - 'LiteFindingsReport' output-reports: active: true @@ -66,6 +66,7 @@ comments: active: false matchTypeParameters: true matchDeclarationsOrder: true + allowParamOnConstructorProperties: false UndocumentedPublicClass: active: false excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] @@ -128,6 +129,7 @@ complexity: NamedArguments: active: false threshold: 3 + ignoreArgumentsMatchingNames: false NestedBlockDepth: active: true threshold: 4 @@ -166,6 +168,8 @@ coroutines: active: false SleepInsteadOfDelay: active: false + SuspendFunWithCoroutineScopeReceiver: + active: false SuspendFunWithFlowReturnType: active: false @@ -275,147 +279,13 @@ exceptions: - 'RuntimeException' - 'Throwable' -formatting: - active: true - android: false - autoCorrect: true - AnnotationOnSeparateLine: - active: false - autoCorrect: true - AnnotationSpacing: - active: false - autoCorrect: true - ArgumentListWrapping: - active: false - autoCorrect: true - indentSize: 4 - maxLineLength: 120 - ChainWrapping: - active: true - autoCorrect: true - CommentSpacing: - active: true - autoCorrect: true - EnumEntryNameCase: - active: false - autoCorrect: true - Filename: - active: true - FinalNewline: - active: true - autoCorrect: true - insertFinalNewLine: true - ImportOrdering: - active: false - autoCorrect: true - layout: '*,java.**,javax.**,kotlin.**,^' - Indentation: - active: false - autoCorrect: true - indentSize: 4 - continuationIndentSize: 4 - MaximumLineLength: - active: true - maxLineLength: 120 - ignoreBackTickedIdentifier: false - ModifierOrdering: - active: true - autoCorrect: true - MultiLineIfElse: - active: false - autoCorrect: true - NoBlankLineBeforeRbrace: - active: true - autoCorrect: true - NoConsecutiveBlankLines: - active: true - autoCorrect: true - NoEmptyClassBody: - active: true - autoCorrect: true - NoEmptyFirstLineInMethodBlock: - active: false - autoCorrect: true - NoLineBreakAfterElse: - active: true - autoCorrect: true - NoLineBreakBeforeAssignment: - active: true - autoCorrect: true - NoMultipleSpaces: - active: true - autoCorrect: true - NoSemicolons: - active: true - autoCorrect: true - NoTrailingSpaces: - active: true - autoCorrect: true - NoUnitReturn: - active: true - autoCorrect: true - NoUnusedImports: - active: true - autoCorrect: true - NoWildcardImports: - active: true - PackageName: - active: false - autoCorrect: true - ParameterListWrapping: - active: true - autoCorrect: true - indentSize: 4 - maxLineLength: 120 - SpacingAroundAngleBrackets: - active: false - autoCorrect: true - SpacingAroundColon: - active: true - autoCorrect: true - SpacingAroundComma: - active: true - autoCorrect: true - SpacingAroundCurly: - active: true - autoCorrect: true - SpacingAroundDot: - active: true - autoCorrect: true - SpacingAroundDoubleColon: - active: false - autoCorrect: true - SpacingAroundKeyword: - active: true - autoCorrect: true - SpacingAroundOperators: - active: true - autoCorrect: true - SpacingAroundParens: - active: true - autoCorrect: true - SpacingAroundRangeOperator: - active: true - autoCorrect: true - SpacingAroundUnaryOperator: - active: false - autoCorrect: true - SpacingBetweenDeclarationsWithAnnotations: - active: false - autoCorrect: true - SpacingBetweenDeclarationsWithComments: - active: false - autoCorrect: true - StringTemplate: - active: true - autoCorrect: true - naming: active: true BooleanPropertyNaming: active: false excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] allowedPattern: '^(is|has|are)' + ignoreOverridden: true ClassNaming: active: true excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] @@ -461,6 +331,7 @@ naming: active: false excludes: ['**/*.kts'] rootPackage: '' + requireRootInDeclaration: false LambdaParameterNaming: active: false excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] @@ -535,8 +406,19 @@ potential-bugs: active: false DoubleMutabilityForCollection: active: false + 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' DuplicateCaseInWhenExpression: active: true + ElseCaseInsteadOfExhaustiveWhen: + active: false EqualsAlwaysReturnsTrueOrFalse: active: true EqualsWithHashCodeExist: @@ -555,6 +437,7 @@ potential-bugs: - '*.CheckReturnValue' ignoreReturnValueAnnotations: - '*.CanIgnoreReturnValue' + ignoreFunctionCall: [] ImplicitDefaultLocale: active: true ImplicitUnitReturnType: @@ -578,6 +461,8 @@ potential-bugs: MissingWhenCase: active: true allowElseExpression: true + NullCheckOnMutableProperty: + active: false NullableToStringCall: active: false RedundantElseInWhen: @@ -606,6 +491,8 @@ potential-bugs: style: active: true + CanBeNonNullable: + active: false ClassOrdering: active: false CollapsibleIfStatements: @@ -750,6 +637,7 @@ style: UnderscoresInNumericLiterals: active: false acceptableLength: 4 + allowNonStandardGrouping: false UnnecessaryAbstractClass: active: true UnnecessaryAnnotationUseSiteTarget: @@ -760,6 +648,8 @@ style: active: false UnnecessaryInheritance: active: true + UnnecessaryInnerClass: + active: false UnnecessaryLet: active: false UnnecessaryParentheses: