Update dependency io.nlopez.compose.rules:detekt to v0.4.8 (#3254)

* Update dependency io.nlopez.compose.rules:detekt to v0.4.8

* Fix new lint issues

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
This commit is contained in:
renovate[bot] 2024-07-31 11:08:11 +02:00 committed by GitHub
parent 48d2d3fc53
commit 69ad8144a2
8 changed files with 15 additions and 6 deletions

View file

@ -61,7 +61,7 @@ allprojects {
config.from(files("$rootDir/tools/detekt/detekt.yml")) config.from(files("$rootDir/tools/detekt/detekt.yml"))
} }
dependencies { dependencies {
detektPlugins("io.nlopez.compose.rules:detekt:0.4.5") detektPlugins("io.nlopez.compose.rules:detekt:0.4.8")
} }
// KtLint // KtLint

View file

@ -58,7 +58,11 @@ import kotlin.math.roundToInt
* @param modifier The modifier for the layout. * @param modifier The modifier for the layout.
* @param sheetContentKey The key for the sheet content. If the key changes, the sheet will be remeasured. * @param sheetContentKey The key for the sheet content. If the key changes, the sheet will be remeasured.
*/ */
@Suppress("ContentTrailingLambda") @Suppress(
"ContentTrailingLambda",
// False positive
"MultipleEmitters",
)
@OptIn(ExperimentalMaterial3Api::class) @OptIn(ExperimentalMaterial3Api::class)
@Composable @Composable
internal fun ExpandableBottomSheetScaffold( internal fun ExpandableBottomSheetScaffold(

View file

@ -218,6 +218,7 @@ private fun SheetContent(
} }
} }
@Suppress("MultipleEmitters") // False positive
@Composable @Composable
private fun MessageSummary(event: TimelineItem.Event, modifier: Modifier = Modifier) { private fun MessageSummary(event: TimelineItem.Event, modifier: Modifier = Modifier) {
val content: @Composable () -> Unit val content: @Composable () -> Unit

View file

@ -376,6 +376,7 @@ private fun MessageSenderInformation(
} }
} }
@Suppress("MultipleEmitters") // False positive
@Composable @Composable
private fun MessageEventBubbleContent( private fun MessageEventBubbleContent(
event: TimelineItem.Event, event: TimelineItem.Event,

View file

@ -110,7 +110,7 @@ fun TimelineItemReactionsLayout(
} }
val rows = rowsIn.toMutableList() val rows = rowsIn.toMutableList()
val secondLastRow = rows[rows.size - 2].toMutableList() val secondLastRow = rows[rows.size - 2].toMutableList()
val expandButtonPlaceable = secondLastRow.removeLast() val expandButtonPlaceable = secondLastRow.removeAt(secondLastRow.lastIndex)
lastRow.add(0, expandButtonPlaceable) lastRow.add(0, expandButtonPlaceable)
rows[rows.size - 2] = secondLastRow rows[rows.size - 2] = secondLastRow
rows[rows.size - 1] = lastRow rows[rows.size - 1] = lastRow

View file

@ -53,6 +53,7 @@ import io.element.android.libraries.designsystem.theme.components.Text
import io.element.android.libraries.matrix.api.room.RoomMember import io.element.android.libraries.matrix.api.room.RoomMember
import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.ImmutableList
@Suppress("MultipleEmitters") // False positive
@Composable @Composable
fun TypingNotificationView( fun TypingNotificationView(
state: TypingNotificationState, state: TypingNotificationState,

View file

@ -64,6 +64,7 @@ import io.element.android.libraries.ui.strings.CommonStrings
import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.toPersistentList import kotlinx.collections.immutable.toPersistentList
@Suppress("MultipleEmitters") // False positive
@OptIn(ExperimentalMaterial3Api::class) @OptIn(ExperimentalMaterial3Api::class)
@Composable @Composable
fun RoomSelectView( fun RoomSelectView(

View file

@ -16,6 +16,7 @@
package io.element.android.libraries.troubleshoot.impl package io.element.android.libraries.troubleshoot.impl
import androidx.compose.foundation.layout.ColumnScope
import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.size
import androidx.compose.foundation.progressSemantics import androidx.compose.foundation.progressSemantics
@ -68,7 +69,7 @@ fun TroubleshootNotificationsView(
} }
@Composable @Composable
private fun TroubleshootTestView( private fun ColumnScope.TroubleshootTestView(
testState: NotificationTroubleshootTestState, testState: NotificationTroubleshootTestState,
onQuickFixClick: () -> Unit, onQuickFixClick: () -> Unit,
) { ) {
@ -127,7 +128,7 @@ private fun TroubleshootTestView(
} }
@Composable @Composable
private fun TroubleshootNotificationsContent(state: TroubleshootNotificationsState) { private fun ColumnScope.TroubleshootNotificationsContent(state: TroubleshootNotificationsState) {
when (state.testSuiteState.mainState) { when (state.testSuiteState.mainState) {
AsyncAction.Loading, AsyncAction.Loading,
AsyncAction.Confirming, AsyncAction.Confirming,
@ -197,7 +198,7 @@ private fun RunTestButton(state: TroubleshootNotificationsState) {
} }
@Composable @Composable
private fun TestSuiteView( private fun ColumnScope.TestSuiteView(
testSuiteState: TroubleshootTestSuiteState, testSuiteState: TroubleshootTestSuiteState,
onQuickFixClick: (Int) -> Unit, onQuickFixClick: (Int) -> Unit,
) { ) {