diff options
author | renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> | 2022-11-21 12:13:33 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-21 12:13:33 +0530 |
commit | 2a6fe4f1595914d2c0f615b0e7250689a3ee9397 (patch) | |
tree | 1646472622312157aaf7dad8f2926e7f7a4f62eb | |
parent | bcf82d46a0d4eda8a21560e12c94be20b99ff099 (diff) |
fix(deps): update dependency io.gitlab.arturbosch.detekt:detekt-gradle-plugin to v1.22.0 (#2262)
* fix(deps): update dependency io.gitlab.arturbosch.detekt:detekt-gradle-plugin to v1.22.0
* chore: sync detekt config with 0.22.0 changes
* chore: fix Detekt warning
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Harsh Shandilya <me@msfjarvis.dev>
-rw-r--r-- | app/src/main/java/app/passwordstore/util/proxy/ProxyUtils.kt | 4 | ||||
-rw-r--r-- | config/detekt/detekt.yml | 35 | ||||
-rw-r--r-- | gradle/libs.versions.toml | 2 |
3 files changed, 12 insertions, 29 deletions
diff --git a/app/src/main/java/app/passwordstore/util/proxy/ProxyUtils.kt b/app/src/main/java/app/passwordstore/util/proxy/ProxyUtils.kt index 633c3904..9eb2d3e3 100644 --- a/app/src/main/java/app/passwordstore/util/proxy/ProxyUtils.kt +++ b/app/src/main/java/app/passwordstore/util/proxy/ProxyUtils.kt @@ -36,9 +36,7 @@ class ProxyUtils @Inject constructor(private val gitSettings: GitSettings) { } override fun connectFailed(uri: URI?, sa: SocketAddress?, ioe: IOException?) { - if (uri == null || sa == null || ioe == null) { - throw IllegalArgumentException("Arguments can't be null.") - } + require(uri == null || sa == null || ioe == null) { "Arguments can't be null." } } } ) diff --git a/config/detekt/detekt.yml b/config/detekt/detekt.yml index 78d50515..67d95a88 100644 --- a/config/detekt/detekt.yml +++ b/config/detekt/detekt.yml @@ -87,6 +87,9 @@ comments: complexity: active: true + CognitiveComplexMethod: + active: false + threshold: 15 ComplexCondition: active: true threshold: 4 @@ -95,9 +98,10 @@ complexity: threshold: 10 includeStaticDeclarations: false includePrivateDeclarations: false - ComplexMethod: + # TODO(msfjarvis): cleanup the offenders and wind this down + CyclomaticComplexMethod: active: true - threshold: 15 + threshold: 40 ignoreSingleWhenExpression: false ignoreSimpleWhenEntries: false ignoreNestingFunctions: false @@ -413,8 +417,6 @@ potential-bugs: - 'java.util.HashSet' - 'java.util.LinkedHashMap' - 'java.util.HashMap' - DuplicateCaseInWhenExpression: - active: true ElseCaseInsteadOfExhaustiveWhen: active: false EqualsAlwaysReturnsTrueOrFalse: @@ -429,7 +431,7 @@ potential-bugs: active: true IgnoredReturnValue: active: true - restrictToAnnotatedMethods: true + restrictToConfig: true returnValueAnnotations: - '*.CheckResult' - '*.CheckReturnValue' @@ -456,15 +458,10 @@ potential-bugs: MissingPackageDeclaration: active: false excludes: ['**/*.kts'] - MissingWhenCase: - active: true - allowElseExpression: true NullCheckOnMutableProperty: active: false NullableToStringCall: active: false - RedundantElseInWhen: - active: true UnconditionalJumpStatementInLoop: active: false UnnecessaryNotNullOperator: @@ -500,7 +497,7 @@ style: active: false DataClassContainsFunctions: active: false - conversionFunctionPrefix: 'to' + conversionFunctionPrefix: ['to'] DataClassShouldBeImmutable: active: false DestructuringDeclarationWithTooManyEntries: @@ -534,12 +531,6 @@ style: methods: - 'kotlin.io.print' - 'kotlin.io.println' - ForbiddenPublicDataClass: - active: true - excludes: ['**'] - ignorePackages: - - '*.internal' - - '*.internal.*' ForbiddenSuppress: active: false rules: [] @@ -551,13 +542,7 @@ style: active: true ignoreOverridableFunction: true ignoreActualFunction: true - excludedFunctions: '' - LibraryCodeMustSpecifyReturnType: - active: true - excludes: ['**'] - LibraryEntitiesShouldNotBePublic: - active: true - excludes: ['**'] + excludedFunctions: [] LoopWithTooManyJumpStatements: active: true maxJumpCount: 1 @@ -627,7 +612,7 @@ style: ReturnCount: active: true max: 2 - excludedFunctions: 'equals' + excludedFunctions: ['equals'] excludeLabeled: false excludeReturnFromLambda: true excludeGuardClauses: false diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6d034d62..e8d3d613 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -38,7 +38,7 @@ androidx-swiperefreshlayout = "androidx.swiperefreshlayout:swiperefreshlayout:1. aps-sublimeFuzzy = "com.github.android-password-store:sublime-fuzzy:2.2.1" aps-zxingAndroidEmbedded = "com.github.android-password-store:zxing-android-embedded:4.2.1" build-agp = { module = "com.android.tools.build:gradle", version.ref = "agp" } -build-detekt = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.21.0" +build-detekt = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.22.0" build-diffutils = "io.github.java-diff-utils:java-diff-utils:4.12" build-download = "de.undercouch:gradle-download-task:5.3.0" build-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } |