Enable detekt rules UseDataClass and fix existing issues.

This commit is contained in:
Benoit Marty
2023-07-26 11:50:58 +02:00
committed by Benoit Marty
parent 15ac81d32a
commit 613cd4f863
2 changed files with 7 additions and 2 deletions

View File

@@ -28,10 +28,12 @@ import timber.log.Timber
@Composable
fun LogCompositions(tag: String, msg: String) {
if (BuildConfig.DEBUG) {
val ref = remember { Ref(0) }
val ref = remember { Ref() }
SideEffect { ref.value++ }
Timber.tag(tag).d("Compositions: $msg ${ref.value}")
}
}
class Ref(var value: Int)
private class Ref {
var value: Int = 0
}

View File

@@ -60,6 +60,9 @@ style:
active: true
acceptableLength: 4
allowNonStandardGrouping: false
UseDataClass:
active: true
allowVars: false
coroutines:
GlobalCoroutineUsage: