diff --git a/app/k9mail/src/release/java/app/k9mail/dev/ReleaseConfig.kt b/app/k9mail/src/release/java/app/k9mail/dev/ReleaseConfig.kt index 930bc8a3f..054e735a8 100644 --- a/app/k9mail/src/release/java/app/k9mail/dev/ReleaseConfig.kt +++ b/app/k9mail/src/release/java/app/k9mail/dev/ReleaseConfig.kt @@ -6,4 +6,6 @@ import org.koin.core.scope.Scope fun Scope.developmentBackends() = emptyMap() -fun Module.developmentModuleAdditions() = Unit +fun Module.developmentModuleAdditions() { + // No-op +} diff --git a/app/storage/src/test/java/com/fsck/k9/preferences/StorageEditorTest.kt b/app/storage/src/test/java/com/fsck/k9/preferences/StorageEditorTest.kt index df3cc7058..cbb09cf5f 100644 --- a/app/storage/src/test/java/com/fsck/k9/preferences/StorageEditorTest.kt +++ b/app/storage/src/test/java/com/fsck/k9/preferences/StorageEditorTest.kt @@ -181,8 +181,7 @@ class StorageEditorTest : K9RobolectricTest() { on { remove(any()) } doAnswer { val key = it.getArgument(0) workingMap.remove(key) - - Unit + return@doAnswer } } diff --git a/app/storage/src/test/java/com/fsck/k9/storage/messages/ChunkedDatabaseOperationsTest.kt b/app/storage/src/test/java/com/fsck/k9/storage/messages/ChunkedDatabaseOperationsTest.kt index ba93095f2..4231258a5 100644 --- a/app/storage/src/test/java/com/fsck/k9/storage/messages/ChunkedDatabaseOperationsTest.kt +++ b/app/storage/src/test/java/com/fsck/k9/storage/messages/ChunkedDatabaseOperationsTest.kt @@ -45,7 +45,6 @@ class ChunkedDatabaseOperationsTest { argumentTransformation = Int::toString, ) { selectionSet, selectionArguments -> chunks.add(selectionSet to selectionArguments) - Unit } assertThat(chunks).hasSize(1) @@ -65,7 +64,6 @@ class ChunkedDatabaseOperationsTest { chunkSize = 1, ) { selectionSet, selectionArguments -> chunks.add(selectionSet to selectionArguments) - Unit } assertThat(chunks).hasSize(2) @@ -89,7 +87,6 @@ class ChunkedDatabaseOperationsTest { chunkSize = 5, ) { selectionSet, selectionArguments -> chunks.add(selectionSet to selectionArguments) - Unit } assertThat(chunks).hasSize(3) diff --git a/cli/autodiscovery-cli/src/main/kotlin/app/k9mail/cli/autodiscovery/SerialRunner.kt b/cli/autodiscovery-cli/src/main/kotlin/app/k9mail/cli/autodiscovery/SerialRunner.kt index b0fe4eb22..b6752a9be 100644 --- a/cli/autodiscovery-cli/src/main/kotlin/app/k9mail/cli/autodiscovery/SerialRunner.kt +++ b/cli/autodiscovery-cli/src/main/kotlin/app/k9mail/cli/autodiscovery/SerialRunner.kt @@ -27,9 +27,7 @@ class SerialRunner(private val runnables: List) { networkError = discoveryResult } } - NoUsableSettingsFound -> { - Unit - } + NoUsableSettingsFound -> { } is UnexpectedException -> { Timber.w(discoveryResult.exception, "Unexpected exception") } diff --git a/config/detekt/detekt.yml b/config/detekt/detekt.yml index 5430b7335..80e5e2049 100644 --- a/config/detekt/detekt.yml +++ b/config/detekt/detekt.yml @@ -663,7 +663,7 @@ style: OptionalAbstractKeyword: active: true OptionalUnit: - active: false + active: true OptionalWhenBraces: active: false PreferToOverPairSyntax: diff --git a/core/ui/compose/testing/src/main/kotlin/app/k9mail/core/ui/compose/testing/ComposeTest.kt b/core/ui/compose/testing/src/main/kotlin/app/k9mail/core/ui/compose/testing/ComposeTest.kt index 7868ccb57..18a358ac4 100644 --- a/core/ui/compose/testing/src/main/kotlin/app/k9mail/core/ui/compose/testing/ComposeTest.kt +++ b/core/ui/compose/testing/src/main/kotlin/app/k9mail/core/ui/compose/testing/ComposeTest.kt @@ -26,7 +26,7 @@ open class ComposeTest { fun getString(@StringRes resourceId: Int): String = RuntimeEnvironment.getApplication().getString(resourceId) - fun runComposeTest(testContent: ComposeContentTestRule.() -> Unit): Unit = with(composeTestRule) { + fun runComposeTest(testContent: ComposeContentTestRule.() -> Unit) = with(composeTestRule) { testContent() } }