Merge pull request #6588 from vector-im/dependabot/gradle/io.gitlab.arturbosch.detekt-1.21.0

Bump io.gitlab.arturbosch.detekt from 1.20.0 to 1.21.0
This commit is contained in:
Adam Brown 2022-08-02 12:56:45 +01:00 committed by GitHub
commit 3fe7a9d8d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 10 additions and 5 deletions

View File

@ -41,7 +41,7 @@ plugins {
// ktlint Plugin // ktlint Plugin
id "org.jlleitschuh.gradle.ktlint" version "10.3.0" id "org.jlleitschuh.gradle.ktlint" version "10.3.0"
// Detekt // Detekt
id "io.gitlab.arturbosch.detekt" version "1.20.0" id "io.gitlab.arturbosch.detekt" version "1.21.0"
// Dependency Analysis // Dependency Analysis
id 'com.autonomousapps.dependency-analysis' version "1.11.2" id 'com.autonomousapps.dependency-analysis' version "1.11.2"

View File

@ -125,6 +125,7 @@ ext.groups = [
'info.picocli', 'info.picocli',
'io.arrow-kt', 'io.arrow-kt',
'io.element.android', 'io.element.android',
'io.github.davidburstrom.contester',
'io.github.detekt.sarif4k', 'io.github.detekt.sarif4k',
'io.github.microutils', 'io.github.microutils',
'io.github.reactivecircus.flowbinding', 'io.github.reactivecircus.flowbinding',

View File

@ -76,7 +76,7 @@ object StringOrderUtils {
} }
fun stringToBase(x: String, alphabet: CharArray): BigInteger { fun stringToBase(x: String, alphabet: CharArray): BigInteger {
if (x.isEmpty()) throw IllegalArgumentException() require(x.isNotEmpty())
val len = alphabet.size.toBigInteger() val len = alphabet.size.toBigInteger()
var result = BigInteger("0") var result = BigInteger("0")
x.reversed().forEachIndexed { index, c -> x.reversed().forEachIndexed { index, c ->

View File

@ -535,7 +535,7 @@ internal class MXMegolmEncryption(
@Throws @Throws
override suspend fun shareHistoryKeysWithDevice(inboundSessionWrapper: InboundGroupSessionHolder, deviceInfo: CryptoDeviceInfo) { override suspend fun shareHistoryKeysWithDevice(inboundSessionWrapper: InboundGroupSessionHolder, deviceInfo: CryptoDeviceInfo) {
if (!inboundSessionWrapper.wrapper.sessionData.sharedHistory) throw IllegalArgumentException("This key can't be shared") require(inboundSessionWrapper.wrapper.sessionData.sharedHistory) { "This key can't be shared" }
Timber.tag(loggerTag.value).i("process shareHistoryKeys for ${inboundSessionWrapper.wrapper.safeSessionId} to ${deviceInfo.shortDebugString()}") Timber.tag(loggerTag.value).i("process shareHistoryKeys for ${inboundSessionWrapper.wrapper.safeSessionId} to ${deviceInfo.shortDebugString()}")
val userId = deviceInfo.userId val userId = deviceInfo.userId
val deviceId = deviceInfo.deviceId val deviceId = deviceInfo.deviceId

View File

@ -119,7 +119,7 @@ internal class EventSenderProcessorThread @Inject constructor(
override fun cancel(eventId: String, roomId: String) { override fun cancel(eventId: String, roomId: String) {
(currentTask as? SendEventQueuedTask) (currentTask as? SendEventQueuedTask)
?.takeIf { it -> it.event.eventId == eventId && it.event.roomId == roomId } ?.takeIf { it.event.eventId == eventId && it.event.roomId == roomId }
?.cancel() ?.cancel()
} }

View File

@ -23,6 +23,8 @@ style:
active: false active: false
ProtectedMemberInFinalClass: ProtectedMemberInFinalClass:
active: false active: false
UseCheckOrError:
active: false
empty-blocks: empty-blocks:
EmptyFunctionBlock: EmptyFunctionBlock:
@ -43,6 +45,8 @@ exceptions:
active: false active: false
TooGenericExceptionThrown: TooGenericExceptionThrown:
active: false active: false
InstanceOfCheckForException:
active: false
complexity: complexity:
TooManyFunctions: TooManyFunctions:

View File

@ -117,7 +117,7 @@ class RoomMemberProfileViewModel @AssistedInject constructor(
it.fold(true) { prev, dev -> prev && (dev.trustLevel?.crossSigningVerified == true) } it.fold(true) { prev, dev -> prev && (dev.trustLevel?.crossSigningVerified == true) }
) )
} }
.execute { it -> .execute {
copy( copy(
allDevicesAreTrusted = it()?.first == true, allDevicesAreTrusted = it()?.first == true,
allDevicesAreCrossSignedTrusted = it()?.second == true allDevicesAreCrossSignedTrusted = it()?.second == true