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
id "org.jlleitschuh.gradle.ktlint" version "10.3.0"
// Detekt
id "io.gitlab.arturbosch.detekt" version "1.20.0"
id "io.gitlab.arturbosch.detekt" version "1.21.0"
// Dependency Analysis
id 'com.autonomousapps.dependency-analysis' version "1.11.2"

View File

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

View File

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

View File

@ -535,7 +535,7 @@ internal class MXMegolmEncryption(
@Throws
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()}")
val userId = deviceInfo.userId
val deviceId = deviceInfo.deviceId

View File

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

View File

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

View File

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