From 50e22c61911e559d4444276ba58949b7515f2045 Mon Sep 17 00:00:00 2001 From: Carter Jernigan Date: Tue, 4 Jan 2022 15:09:29 -0500 Subject: [PATCH] [#335] Detekt 1.19.0 --- gradle.properties | 2 +- tools/detekt.yml | 38 ++++++++++++++++++++++++++------------ 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/gradle.properties b/gradle.properties index f2a9295d..7cb6c495 100644 --- a/gradle.properties +++ b/gradle.properties @@ -61,7 +61,7 @@ ANDROID_COMPILE_SDK_VERSION=31 ANDROID_NDK_VERSION=22.1.7171670 ANDROID_GRADLE_PLUGIN_VERSION=7.0.3 -DETEKT_VERSION=1.18.1 +DETEKT_VERSION=1.19.0 DOKKA_VERSION=1.6.10 GRADLE_VERSIONS_PLUGIN_VERSION=0.38.0 KTLINT_VERSION=0.43.0 diff --git a/tools/detekt.yml b/tools/detekt.yml index 0a100956..50127de6 100644 --- a/tools/detekt.yml +++ b/tools/detekt.yml @@ -38,6 +38,7 @@ console-reports: - 'NotificationReport' # - 'FindingsReport' - 'FileBasedFindingsReport' + - 'LiteFindingsReport' output-reports: active: true @@ -61,6 +62,10 @@ comments: EndOfSentenceFormat: active: false endOfSentenceFormat: '([.?!][ \t\n\r\f<])|([.?!:]$)' + OutdatedDocumentation: + active: false + matchTypeParameters: true + matchDeclarationsOrder: true UndocumentedPublicClass: active: false excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] @@ -110,14 +115,13 @@ complexity: LongMethod: active: true threshold: 60 - ignoreAnnotated: [] LongParameterList: active: true functionThreshold: 6 constructorThreshold: 7 ignoreDefaultParameters: false ignoreDataClasses: true - ignoreAnnotated: [] + ignoreAnnotatedParameter: [] MethodOverloading: active: false threshold: 6 @@ -152,6 +156,12 @@ coroutines: active: true GlobalCoroutineUsage: active: false + InjectDispatcher: + active: false + dispatcherNames: + - 'IO' + - 'Default' + - 'Unconfined' RedundantSuspendModifier: active: false SleepInsteadOfDelay: @@ -312,7 +322,7 @@ formatting: active: true autoCorrect: true MultiLineIfElse: - active: true + active: false autoCorrect: true NoBlankLineBeforeRbrace: active: true @@ -350,7 +360,7 @@ formatting: NoWildcardImports: active: true PackageName: - active: true + active: false autoCorrect: true ParameterListWrapping: active: true @@ -451,6 +461,10 @@ naming: active: false excludes: ['**/*.kts'] rootPackage: '' + LambdaParameterNaming: + active: false + excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] + parameterPattern: '[a-z][A-Za-z0-9]*|_' MatchingDeclarationName: active: true mustBeFirst: true @@ -555,10 +569,12 @@ potential-bugs: LateinitUsage: active: false excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] - excludeAnnotatedProperties: [] ignoreOnClassesPattern: '' MapGetWithNotNullAssertionOperator: active: false + MissingPackageDeclaration: + active: false + excludes: ['**/*.kts'] MissingWhenCase: active: true allowElseExpression: true @@ -578,6 +594,7 @@ potential-bugs: active: true UnsafeCallOnNullableType: active: true + excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] UnsafeCast: active: true UnusedUnaryOperator: @@ -619,6 +636,7 @@ style: - 'STOPSHIP:' - 'TODO:' allowedPatterns: '\[[^\]]\d+\]' + customMessage: '' ForbiddenImport: active: false imports: [] @@ -643,8 +661,6 @@ style: ignoreOverridableFunction: true ignoreActualFunction: true excludedFunctions: '' - excludeAnnotatedFunction: - - 'dagger.Provides' LibraryCodeMustSpecifyReturnType: active: true excludes: ['**'] @@ -733,11 +749,9 @@ style: active: false UnderscoresInNumericLiterals: active: false - acceptableDecimalLength: 5 + acceptableLength: 4 UnnecessaryAbstractClass: active: true - excludeAnnotatedClasses: - - 'dagger.Module' UnnecessaryAnnotationUseSiteTarget: active: false UnnecessaryApply: @@ -759,6 +773,8 @@ style: UnusedPrivateMember: active: true allowedNames: '(_|ignored|expected|serialVersionUID)' + UseAnyOrNoneInsteadOfFind: + active: false UseArrayLiteralsInAnnotations: active: false UseCheckNotNull: @@ -767,7 +783,6 @@ style: active: false UseDataClass: active: false - excludeAnnotatedClasses: [] allowVars: false UseEmptyCounterpart: active: false @@ -794,4 +809,3 @@ style: excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**'] excludeImports: - 'java.util.*' - - 'kotlinx.android.synthetic.*'