0
0
mirror of https://github.com/thunderbird/thunderbird-android.git synced 2024-09-19 19:52:14 +02:00

Enable OptionalUnit rule

This commit is contained in:
Wolf-Martell Montwé 2023-10-10 11:19:59 +02:00
parent b970e2f90f
commit 0333e4714e
No known key found for this signature in database
GPG Key ID: 6D45B21512ACBF72
6 changed files with 7 additions and 11 deletions

View File

@ -6,4 +6,6 @@ import org.koin.core.scope.Scope
fun Scope.developmentBackends() = emptyMap<String, BackendFactory>()
fun Module.developmentModuleAdditions() = Unit
fun Module.developmentModuleAdditions() {
// No-op
}

View File

@ -181,8 +181,7 @@ class StorageEditorTest : K9RobolectricTest() {
on { remove(any()) } doAnswer {
val key = it.getArgument<String>(0)
workingMap.remove(key)
Unit
return@doAnswer
}
}

View File

@ -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)

View File

@ -27,9 +27,7 @@ class SerialRunner(private val runnables: List<AutoDiscoveryRunnable>) {
networkError = discoveryResult
}
}
NoUsableSettingsFound -> {
Unit
}
NoUsableSettingsFound -> { }
is UnexpectedException -> {
Timber.w(discoveryResult.exception, "Unexpected exception")
}

View File

@ -663,7 +663,7 @@ style:
OptionalAbstractKeyword:
active: true
OptionalUnit:
active: false
active: true
OptionalWhenBraces:
active: false
PreferToOverPairSyntax:

View File

@ -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()
}
}