diff --git a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/crash/VectorUncaughtExceptionHandler.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/crash/VectorUncaughtExceptionHandler.kt index a5e7edf405..b71c8af372 100644 --- a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/crash/VectorUncaughtExceptionHandler.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/crash/VectorUncaughtExceptionHandler.kt @@ -62,9 +62,9 @@ class VectorUncaughtExceptionHandler( totalSize = info.totalMemory() usedSize = totalSize - freeSize } - append("usedSize " + usedSize / 1048576L + " MB\n") - append("freeSize " + freeSize / 1048576L + " MB\n") - append("totalSize " + totalSize / 1048576L + " MB\n") + append("usedSize " + usedSize / 1_048_576L + " MB\n") + append("freeSize " + freeSize / 1_048_576L + " MB\n") + append("totalSize " + totalSize / 1_048_576L + " MB\n") append("Thread: ") append(thread.name) append(", Exception: ") diff --git a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/previews/DatePickerPreview.kt b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/previews/DatePickerPreview.kt index a422c5e729..685fe40302 100644 --- a/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/previews/DatePickerPreview.kt +++ b/libraries/designsystem/src/main/kotlin/io/element/android/libraries/designsystem/theme/components/previews/DatePickerPreview.kt @@ -44,7 +44,7 @@ internal fun DatePickerPreviewDark() { @Composable private fun ContentToPreview() { val state = rememberDatePickerState( - initialSelectedDateMillis = 1672578000000L, + initialSelectedDateMillis = 1_672_578_000_000L, ) AlertDialogContent( buttons = { /*TODO*/ }, diff --git a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/timeline/postprocessor/TimelineEncryptedHistoryPostProcessorTest.kt b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/timeline/postprocessor/TimelineEncryptedHistoryPostProcessorTest.kt index 91f0bc1883..3270f6048f 100644 --- a/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/timeline/postprocessor/TimelineEncryptedHistoryPostProcessorTest.kt +++ b/libraries/matrix/impl/src/test/kotlin/io/element/android/libraries/matrix/impl/timeline/postprocessor/TimelineEncryptedHistoryPostProcessorTest.kt @@ -27,7 +27,7 @@ import java.util.Date class TimelineEncryptedHistoryPostProcessorTest { - private val defaultLastLoginTimestamp = Date(1689061264L) + private val defaultLastLoginTimestamp = Date(1_689_061_264L) @Test fun `given an unencrypted room, nothing is done`() { diff --git a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/NotificationIdProviderTest.kt b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/NotificationIdProviderTest.kt index 57f28e72db..b9664ef577 100644 --- a/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/NotificationIdProviderTest.kt +++ b/libraries/push/impl/src/test/kotlin/io/element/android/libraries/push/impl/notifications/NotificationIdProviderTest.kt @@ -25,7 +25,7 @@ class NotificationIdProviderTest { @Test fun `test notification id provider`() { val sut = NotificationIdProvider() - val offsetForASessionId = 305410 + val offsetForASessionId = 305_410 assertThat(sut.getSummaryNotificationId(A_SESSION_ID)).isEqualTo(offsetForASessionId + 0) assertThat(sut.getRoomMessagesNotificationId(A_SESSION_ID)).isEqualTo(offsetForASessionId + 1) assertThat(sut.getRoomEventNotificationId(A_SESSION_ID)).isEqualTo(offsetForASessionId + 2) diff --git a/tools/detekt/detekt.yml b/tools/detekt/detekt.yml index 388076639f..0675583bd8 100644 --- a/tools/detekt/detekt.yml +++ b/tools/detekt/detekt.yml @@ -56,6 +56,10 @@ style: active: true OptionalUnit: active: true + UnderscoresInNumericLiterals: + active: true + acceptableLength: 4 + allowNonStandardGrouping: false coroutines: GlobalCoroutineUsage: