mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Enable detekt rules UseDataClass and fix existing issues.
This commit is contained in:
committed by
Benoit Marty
parent
b3cf0d2cf1
commit
b8281052b9
+4
-2
@@ -28,10 +28,12 @@ import timber.log.Timber
|
|||||||
@Composable
|
@Composable
|
||||||
fun LogCompositions(tag: String, msg: String) {
|
fun LogCompositions(tag: String, msg: String) {
|
||||||
if (BuildConfig.DEBUG) {
|
if (BuildConfig.DEBUG) {
|
||||||
val ref = remember { Ref(0) }
|
val ref = remember { Ref() }
|
||||||
SideEffect { ref.value++ }
|
SideEffect { ref.value++ }
|
||||||
Timber.tag(tag).d("Compositions: $msg ${ref.value}")
|
Timber.tag(tag).d("Compositions: $msg ${ref.value}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class Ref(var value: Int)
|
private class Ref {
|
||||||
|
var value: Int = 0
|
||||||
|
}
|
||||||
|
|||||||
@@ -60,6 +60,9 @@ style:
|
|||||||
active: true
|
active: true
|
||||||
acceptableLength: 4
|
acceptableLength: 4
|
||||||
allowNonStandardGrouping: false
|
allowNonStandardGrouping: false
|
||||||
|
UseDataClass:
|
||||||
|
active: true
|
||||||
|
allowVars: false
|
||||||
|
|
||||||
coroutines:
|
coroutines:
|
||||||
GlobalCoroutineUsage:
|
GlobalCoroutineUsage:
|
||||||
|
|||||||
Reference in New Issue
Block a user