From 2bd1c7593743d0f46c870c6b68257a50afef570d Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 20 Jul 2023 17:50:23 +0200 Subject: [PATCH] Enable detekt rules `VariableNaming` and cleanup the code. --- .../features/rageshake/impl/reporter/DefaultBugReporter.kt | 6 +++--- tools/detekt/detekt.yml | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/reporter/DefaultBugReporter.kt b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/reporter/DefaultBugReporter.kt index 518be1a045..65dc48aca8 100755 --- a/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/reporter/DefaultBugReporter.kt +++ b/features/rageshake/impl/src/main/kotlin/io/element/android/features/rageshake/impl/reporter/DefaultBugReporter.kt @@ -103,7 +103,7 @@ class DefaultBugReporter @Inject constructor( .adapter(Types.newParameterizedType(Map::class.java, String::class.java, Any::class.java)) */ - private val LOGCAT_CMD_ERROR = arrayOf( + private val logcatCommandError = arrayOf( "logcat", // /< Run 'logcat' command "-d", // /< Dump the log rather than continue outputting it "-v", // formatting @@ -114,7 +114,7 @@ class DefaultBugReporter @Inject constructor( "*:S" // /< Everything else silent, so don't pick it.. ) - private val LOGCAT_CMD_DEBUG = arrayOf("logcat", "-d", "-v", "threadtime", "*:*") + private val logcatCommandDebug = arrayOf("logcat", "-d", "-v", "threadtime", "*:*") /** * Send a bug report. @@ -500,7 +500,7 @@ class DefaultBugReporter @Inject constructor( val logcatProc: Process try { - logcatProc = Runtime.getRuntime().exec(if (isErrorLogCat) LOGCAT_CMD_ERROR else LOGCAT_CMD_DEBUG) + logcatProc = Runtime.getRuntime().exec(if (isErrorLogCat) logcatCommandError else logcatCommandDebug) } catch (e1: IOException) { return } diff --git a/tools/detekt/detekt.yml b/tools/detekt/detekt.yml index 320c6a03cf..ea02b86b9f 100644 --- a/tools/detekt/detekt.yml +++ b/tools/detekt/detekt.yml @@ -69,8 +69,7 @@ complexity: naming: VariableNaming: - # TODO Enable it - active: false + active: true TopLevelPropertyNaming: # TODO Enable it active: false