mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 20:38:40 +00:00
Enable detekt rules UnderscoresInNumericLiterals and fix existing issues.
This commit is contained in:
committed by
Benoit Marty
parent
0e219200b0
commit
b3cf0d2cf1
+3
-3
@@ -62,9 +62,9 @@ class VectorUncaughtExceptionHandler(
|
|||||||
totalSize = info.totalMemory()
|
totalSize = info.totalMemory()
|
||||||
usedSize = totalSize - freeSize
|
usedSize = totalSize - freeSize
|
||||||
}
|
}
|
||||||
append("usedSize " + usedSize / 1048576L + " MB\n")
|
append("usedSize " + usedSize / 1_048_576L + " MB\n")
|
||||||
append("freeSize " + freeSize / 1048576L + " MB\n")
|
append("freeSize " + freeSize / 1_048_576L + " MB\n")
|
||||||
append("totalSize " + totalSize / 1048576L + " MB\n")
|
append("totalSize " + totalSize / 1_048_576L + " MB\n")
|
||||||
append("Thread: ")
|
append("Thread: ")
|
||||||
append(thread.name)
|
append(thread.name)
|
||||||
append(", Exception: ")
|
append(", Exception: ")
|
||||||
|
|||||||
+1
-1
@@ -44,7 +44,7 @@ internal fun DatePickerPreviewDark() {
|
|||||||
@Composable
|
@Composable
|
||||||
private fun ContentToPreview() {
|
private fun ContentToPreview() {
|
||||||
val state = rememberDatePickerState(
|
val state = rememberDatePickerState(
|
||||||
initialSelectedDateMillis = 1672578000000L,
|
initialSelectedDateMillis = 1_672_578_000_000L,
|
||||||
)
|
)
|
||||||
AlertDialogContent(
|
AlertDialogContent(
|
||||||
buttons = { /*TODO*/ },
|
buttons = { /*TODO*/ },
|
||||||
|
|||||||
+1
-1
@@ -27,7 +27,7 @@ import java.util.Date
|
|||||||
|
|
||||||
class TimelineEncryptedHistoryPostProcessorTest {
|
class TimelineEncryptedHistoryPostProcessorTest {
|
||||||
|
|
||||||
private val defaultLastLoginTimestamp = Date(1689061264L)
|
private val defaultLastLoginTimestamp = Date(1_689_061_264L)
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `given an unencrypted room, nothing is done`() {
|
fun `given an unencrypted room, nothing is done`() {
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@ class NotificationIdProviderTest {
|
|||||||
@Test
|
@Test
|
||||||
fun `test notification id provider`() {
|
fun `test notification id provider`() {
|
||||||
val sut = NotificationIdProvider()
|
val sut = NotificationIdProvider()
|
||||||
val offsetForASessionId = 305410
|
val offsetForASessionId = 305_410
|
||||||
assertThat(sut.getSummaryNotificationId(A_SESSION_ID)).isEqualTo(offsetForASessionId + 0)
|
assertThat(sut.getSummaryNotificationId(A_SESSION_ID)).isEqualTo(offsetForASessionId + 0)
|
||||||
assertThat(sut.getRoomMessagesNotificationId(A_SESSION_ID)).isEqualTo(offsetForASessionId + 1)
|
assertThat(sut.getRoomMessagesNotificationId(A_SESSION_ID)).isEqualTo(offsetForASessionId + 1)
|
||||||
assertThat(sut.getRoomEventNotificationId(A_SESSION_ID)).isEqualTo(offsetForASessionId + 2)
|
assertThat(sut.getRoomEventNotificationId(A_SESSION_ID)).isEqualTo(offsetForASessionId + 2)
|
||||||
|
|||||||
@@ -56,6 +56,10 @@ style:
|
|||||||
active: true
|
active: true
|
||||||
OptionalUnit:
|
OptionalUnit:
|
||||||
active: true
|
active: true
|
||||||
|
UnderscoresInNumericLiterals:
|
||||||
|
active: true
|
||||||
|
acceptableLength: 4
|
||||||
|
allowNonStandardGrouping: false
|
||||||
|
|
||||||
coroutines:
|
coroutines:
|
||||||
GlobalCoroutineUsage:
|
GlobalCoroutineUsage:
|
||||||
|
|||||||
Reference in New Issue
Block a user