diff --git a/Habitica/res/values/strings.xml b/Habitica/res/values/strings.xml
index 8622ffc1e..7033c5a06 100644
--- a/Habitica/res/values/strings.xml
+++ b/Habitica/res/values/strings.xml
@@ -1179,4 +1179,5 @@
You completed all your tasks. Well done!
Privacy Policy
Terms of Service
+ %.01f dmg pending
diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/helpers/DeviceName.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/helpers/DeviceName.kt
index 0de40c450..9f0130806 100644
--- a/Habitica/src/main/java/com/habitrpg/android/habitica/helpers/DeviceName.kt
+++ b/Habitica/src/main/java/com/habitrpg/android/habitica/helpers/DeviceName.kt
@@ -398,7 +398,7 @@ object DeviceName {
@WorkerThread
fun getDeviceInfo(context: Context, codename: String?, model: String?): DeviceInfo {
val prefs = context.getSharedPreferences(SHARED_PREF_NAME, Context.MODE_PRIVATE)
- val key = String.format("%s:%s", codename, model)
+ val key = String.format(Locale.getDefault(), "%s:%s", codename, model)
val savedJson = prefs.getString(key, null)
if (savedJson != null) {
try {
diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/helpers/KeyHelper.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/helpers/KeyHelper.kt
index 6a098d239..11baf7aab 100644
--- a/Habitica/src/main/java/com/habitrpg/android/habitica/helpers/KeyHelper.kt
+++ b/Habitica/src/main/java/com/habitrpg/android/habitica/helpers/KeyHelper.kt
@@ -8,6 +8,7 @@ import android.security.keystore.KeyGenParameterSpec
import android.security.keystore.KeyProperties
import android.util.Base64
import androidx.core.content.edit
+import com.habitrpg.shared.habitica.HLogger
import java.io.ByteArrayInputStream
import java.io.ByteArrayOutputStream
import java.io.IOException
@@ -40,7 +41,7 @@ constructor(ctx: Context, var sharedPreferences: SharedPreferences, var keyStore
try {
this.generateAESKey()
} catch (e: Exception) {
- e.printStackTrace()
+ HLogger.logException("KeyHelper", "Error initializing", e)
}
}
}
@@ -144,14 +145,14 @@ constructor(ctx: Context, var sharedPreferences: SharedPreferences, var keyStore
try {
c.init(Cipher.ENCRYPT_MODE, aesKeyFromKS, GCMParameterSpec(128, Base64.decode(publicIV, Base64.DEFAULT)))
} catch (e: Exception) {
- e.printStackTrace()
+ HLogger.logException("KeyHelper", "Error encrypting", e)
}
} else {
c = Cipher.getInstance(AES_MODE_M)
try {
c.init(Cipher.ENCRYPT_MODE, getSecretKey(), GCMParameterSpec(128, Base64.decode(publicIV, Base64.DEFAULT)))
} catch (e: Exception) {
- e.printStackTrace()
+ HLogger.logException("KeyHelper", "Error encrypting", e)
}
}
val encodedBytes = c.doFinal(input.toByteArray(charset("UTF-8")))
@@ -168,14 +169,14 @@ constructor(ctx: Context, var sharedPreferences: SharedPreferences, var keyStore
try {
c.init(Cipher.DECRYPT_MODE, aesKeyFromKS, GCMParameterSpec(128, Base64.decode(publicIV, Base64.DEFAULT)))
} catch (e: Exception) {
- e.printStackTrace()
+ HLogger.logException("KeyHelper", "Error decrypting", e)
}
} else {
c = Cipher.getInstance(AES_MODE_M)
try {
c.init(Cipher.DECRYPT_MODE, getSecretKey(), GCMParameterSpec(128, Base64.decode(publicIV, Base64.DEFAULT)))
} catch (e: Exception) {
- e.printStackTrace()
+ HLogger.logException("KeyHelper", "Error decrypting", e)
}
}
@@ -221,19 +222,19 @@ constructor(ctx: Context, var sharedPreferences: SharedPreferences, var keyStore
try {
keyHelper = KeyHelper(ctx, sharedPreferences, keyStore)
} catch (e: NoSuchPaddingException) {
- e.printStackTrace()
+ HLogger.logException("KeyHelper", "Error initializing", e)
} catch (e: NoSuchProviderException) {
- e.printStackTrace()
+ HLogger.logException("KeyHelper", "Error initializing", e)
} catch (e: NoSuchAlgorithmException) {
- e.printStackTrace()
+ HLogger.logException("KeyHelper", "Error initializing", e)
} catch (e: InvalidAlgorithmParameterException) {
- e.printStackTrace()
+ HLogger.logException("KeyHelper", "Error initializing", e)
} catch (e: KeyStoreException) {
- e.printStackTrace()
+ HLogger.logException("KeyHelper", "Error initializing", e)
} catch (e: CertificateException) {
- e.printStackTrace()
+ HLogger.logException("KeyHelper", "Error initializing", e)
} catch (e: IOException) {
- e.printStackTrace()
+ HLogger.logException("KeyHelper", "Error initializing", e)
}
}
return keyHelper
diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/models/user/Items.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/models/user/Items.kt
index c984eedf2..049378511 100644
--- a/Habitica/src/main/java/com/habitrpg/android/habitica/models/user/Items.kt
+++ b/Habitica/src/main/java/com/habitrpg/android/habitica/models/user/Items.kt
@@ -39,18 +39,18 @@ open class Items : RealmObject, BaseObject {
var mounts: RealmList? = null
var currentMount: String? = null
var currentPet: String? = null
- var lastDrop_count: Int = 0
- var lastDrop_date: Date? = null
+ var lastDropCount: Int = 0
+ var lastDropDate: Date? = null
// private QuestContent quest;
var gear: Gear? = null
var special: SpecialItems? = null
- constructor(currentMount: String, currentPet: String, lastDrop_count: Int, lastDrop_date: Date) {
+ constructor(currentMount: String, currentPet: String, lastDropCount: Int, lastDropDate: Date) {
this.currentMount = currentMount
this.currentPet = currentPet
- this.lastDrop_count = lastDrop_count
- this.lastDrop_date = lastDrop_date
+ this.lastDropCount = lastDropCount
+ this.lastDropDate = lastDropDate
}
constructor()
diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/modules/AppModule.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/modules/AppModule.kt
index c4c22aa16..2abbcbb30 100644
--- a/Habitica/src/main/java/com/habitrpg/android/habitica/modules/AppModule.kt
+++ b/Habitica/src/main/java/com/habitrpg/android/habitica/modules/AppModule.kt
@@ -12,6 +12,7 @@ import com.habitrpg.android.habitica.executors.UIThread
import com.habitrpg.android.habitica.helpers.*
import com.habitrpg.android.habitica.helpers.KeyHelper.Companion.getInstance
import com.habitrpg.android.habitica.helpers.notifications.PushNotificationManager
+import com.habitrpg.shared.habitica.HLogger
import dagger.Module
import dagger.Provides
import java.io.IOException
@@ -42,13 +43,13 @@ class AppModule(private val application: Application) {
keyStore.load(null)
return keyStore
} catch (e: KeyStoreException) {
- e.printStackTrace()
+ HLogger.logException("KeyHelper", "Error initializing", e)
} catch (e: CertificateException) {
- e.printStackTrace()
+ HLogger.logException("KeyHelper", "Error initializing", e)
} catch (e: NoSuchAlgorithmException) {
- e.printStackTrace()
+ HLogger.logException("KeyHelper", "Error initializing", e)
} catch (e: IOException) {
- e.printStackTrace()
+ HLogger.logException("KeyHelper", "Error initializing", e)
}
return null
}
diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/fragments/social/InboxMessageListFragment.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/fragments/social/InboxMessageListFragment.kt
index 6e189dfd1..1b49a297f 100644
--- a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/fragments/social/InboxMessageListFragment.kt
+++ b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/fragments/social/InboxMessageListFragment.kt
@@ -262,5 +262,4 @@ class InboxMessageListFragment : BaseMainFragment
private val FILENAME_MAP: Map
diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/login/LoginBackgroundView.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/login/LoginBackgroundView.kt
index 977cbf12c..38a6d36db 100644
--- a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/login/LoginBackgroundView.kt
+++ b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/login/LoginBackgroundView.kt
@@ -83,15 +83,9 @@ class LoginBackgroundView(context: Context, attrs: AttributeSet?) : RelativeLayo
private fun generateStars(largeCount: Int, mediumCount: Int, smallCount: Int) {
removeStarViews()
- for (x in 0 until largeCount) {
- generateStar(2)
- }
- for (x in 0 until mediumCount) {
- generateStar(1)
- }
- for (x in 0 until smallCount) {
- generateStar(0)
- }
+ repeat((0 until largeCount).count()) { generateStar(2) }
+ repeat((0 until mediumCount).count()) { generateStar(1) }
+ repeat((0 until smallCount).count()) { generateStar(0) }
requestLayout()
}
diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/social/OldQuestProgressView.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/social/OldQuestProgressView.kt
index 15e139295..30509a306 100644
--- a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/social/OldQuestProgressView.kt
+++ b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/social/OldQuestProgressView.kt
@@ -114,7 +114,7 @@ class OldQuestProgressView : LinearLayout {
val collectedItems = user.party?.quest?.progress?.collectedItems
if (userOnQuest == true) {
binding.bossHealthView.pendingValue = value
- binding.bossHealthView.description = String.format("%.01f dmg pending", value)
+ binding.bossHealthView.description = context.getString(R.string.damage_pending, value)
binding.bossHealthView.descriptionIconVisibility = View.VISIBLE
binding.collectedItemsNumberView.text = context.getString(R.string.quest_items_found, collectedItems)
} else {
diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/social/QuestMenuView.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/social/QuestMenuView.kt
index b079d02cc..56fb4ec1a 100644
--- a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/social/QuestMenuView.kt
+++ b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/social/QuestMenuView.kt
@@ -17,6 +17,7 @@ import com.habitrpg.android.habitica.models.inventory.QuestContent
import com.habitrpg.android.habitica.models.user.User
import com.habitrpg.android.habitica.ui.helpers.DataBindingUtils
import com.habitrpg.android.habitica.ui.views.HabiticaIconsHelper
+import java.util.Locale
class QuestMenuView : LinearLayout {
private val binding = QuestMenuViewBinding.inflate(context.layoutInflater, this, true)
@@ -62,7 +63,7 @@ class QuestMenuView : LinearLayout {
}
fun configure(user: User) {
- binding.pendingDamageTextView.text = String.format("%.01f", (user.party?.quest?.progress?.up ?: 0f))
+ binding.pendingDamageTextView.text = String.format(Locale.getDefault(), "%.01f", (user.party?.quest?.progress?.up ?: 0f))
}
fun hideBossArt() {
diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/social/QuestProgressView.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/social/QuestProgressView.kt
index daa3e38c8..2a9425787 100644
--- a/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/social/QuestProgressView.kt
+++ b/Habitica/src/main/java/com/habitrpg/android/habitica/ui/views/social/QuestProgressView.kt
@@ -168,7 +168,7 @@ class QuestProgressView : LinearLayout {
}
fun configure(user: User) {
- binding.pendingDamageTextView.text = String.format("%.01f dmg pending", (user.party?.quest?.progress?.up ?: 0F))
+ binding.pendingDamageTextView.text = context.getString(R.string.damage_pending, (user.party?.quest?.progress?.up ?: 0F))
val collectedItems = user.party?.quest?.progress?.collectedItems ?: 0
binding.collectedItemsNumberView.text = context.getString(R.string.quest_items_found, collectedItems)
}
diff --git a/Habitica/src/main/java/com/habitrpg/android/habitica/userpicture/BitmapUtils.kt b/Habitica/src/main/java/com/habitrpg/android/habitica/userpicture/BitmapUtils.kt
index ad52b4523..fdc5aeecc 100644
--- a/Habitica/src/main/java/com/habitrpg/android/habitica/userpicture/BitmapUtils.kt
+++ b/Habitica/src/main/java/com/habitrpg/android/habitica/userpicture/BitmapUtils.kt
@@ -25,7 +25,6 @@ object BitmapUtils {
out.close()
return File(name)
} catch (ignored: Exception) {
- ignored.printStackTrace()
}
return null
diff --git a/build.gradle b/build.gradle
index 8fe89a94b..ee1f93c6c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -15,7 +15,7 @@ buildscript {
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
classpath "io.realm:realm-gradle-plugin:10.8.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
- classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.1.0"
+ classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.18.1"
classpath "android.arch.navigation:navigation-safe-args-gradle-plugin:1.0.0"
classpath 'com.google.firebase:perf-plugin:1.4.0'
}
diff --git a/detekt.yml b/detekt.yml
index d14593fe5..673a605ca 100644
--- a/detekt.yml
+++ b/detekt.yml
@@ -1,119 +1,170 @@
-autoCorrect: true
-failFast: false
-
build:
- warningThreshold: 5
- failThreshold: 10
+ maxIssues: 0
+ excludeCorrectable: false
weights:
- complexity: 2
- formatting: 1
- LongParameterList: 1
- comments: 1
+ # complexity: 2
+ # LongParameterList: 1
+ # style: 1
+ # comments: 1
+
+config:
+ validation: true
+ warningsAsErrors: false
+ # when writing own rules with new properties, exclude the property path e.g.: 'my_rule_set,.*>.*>[my_property]'
+ excludes: ''
processors:
active: true
exclude:
+ - 'DetektProgressListener'
+ # - 'KtFileCountProcessor'
+ # - 'PackageCountProcessor'
+ # - 'ClassCountProcessor'
# - 'FunctionCountProcessor'
# - 'PropertyCountProcessor'
- # - 'ClassCountProcessor'
- # - 'PackageCountProcessor'
- # - 'KtFileCountProcessor'
+ # - 'ProjectComplexityProcessor'
+ # - 'ProjectCognitiveComplexityProcessor'
+ # - 'ProjectLLOCProcessor'
+ # - 'ProjectCLOCProcessor'
+ # - 'ProjectLOCProcessor'
+ # - 'ProjectSLOCProcessor'
+ # - 'LicenseHeaderLoaderExtension'
console-reports:
active: true
exclude:
- # - 'ProjectStatisticsReport'
- # - 'ComplexityReport'
- # - 'NotificationReport'
+ # - 'ProjectStatisticsReport'
+ # - 'ComplexityReport'
+ # - 'NotificationReport'
# - 'FindingsReport'
- # - 'BuildFailureReport'
+ - 'FileBasedFindingsReport'
output-reports:
active: true
exclude:
- # - 'PlainOutputReport'
- # - 'XmlOutputReport'
+ # - 'TxtOutputReport'
+ # - 'XmlOutputReport'
+ # - 'HtmlOutputReport'
-potential-bugs:
+comments:
active: true
- DuplicateCaseInWhenExpression:
- active: true
- EqualsAlwaysReturnsTrueOrFalse:
+ AbsentOrWrongFileLicense:
active: false
- EqualsWithHashCodeExist:
- active: true
- WrongEqualsTypeParameter:
+ licenseTemplateFile: 'license.template'
+ licenseTemplateIsRegex: false
+ CommentOverPrivateFunction:
active: false
- ExplicitGarbageCollectionCall:
- active: true
- UnreachableCode:
- active: true
- LateinitUsage:
+ CommentOverPrivateProperty:
active: false
- UnsafeCallOnNullableType:
- active: true
- UnsafeCast:
- active: true
- UselessPostfixExpression:
+ DeprecatedBlockTag:
active: false
+ EndOfSentenceFormat:
+ active: false
+ endOfSentenceFormat: '([.?!][ \t\n\r\f<])|([.?!:]$)'
+ UndocumentedPublicClass:
+ active: false
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ searchInNestedClass: true
+ searchInInnerClass: true
+ searchInInnerObject: true
+ searchInInnerInterface: true
+ UndocumentedPublicFunction:
+ active: false
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ UndocumentedPublicProperty:
+ active: false
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
-performance:
+complexity:
active: true
- ForEachOnRange:
+ ComplexCondition:
active: true
- SpreadOperator:
+ threshold: 4
+ excludes: ['**helpers/DeviceName.kt', '**/utils/**.kt']
+ ComplexInterface:
+ active: false
+ threshold: 10
+ includeStaticDeclarations: false
+ includePrivateDeclarations: false
+ ComplexMethod:
active: true
- UnnecessaryTemporaryInstantiation:
+ threshold: 20
+ ignoreSingleWhenExpression: false
+ ignoreSimpleWhenEntries: false
+ ignoreNestingFunctions: false
+ nestingFunctions:
+ - 'also'
+ - 'apply'
+ - 'forEach'
+ - 'isNotNull'
+ - 'ifNull'
+ - 'let'
+ - 'run'
+ - 'use'
+ - 'with'
+ LabeledExpression:
+ active: false
+ ignoredLabels: []
+ LargeClass:
active: true
+ threshold: 600
+ LongMethod:
+ active: true
+ threshold: 80
+ ignoreAnnotated: []
+ LongParameterList:
+ active: true
+ functionThreshold: 6
+ constructorThreshold: 7
+ ignoreDefaultParameters: false
+ ignoreDataClasses: true
+ ignoreAnnotated: []
+ MethodOverloading:
+ active: false
+ threshold: 6
+ NamedArguments:
+ active: false
+ threshold: 3
+ NestedBlockDepth:
+ active: true
+ threshold: 4
+ ReplaceSafeCallChainWithRun:
+ active: false
+ StringLiteralDuplication:
+ active: false
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ threshold: 6
+ ignoreAnnotation: true
+ excludeStringsWithLessThan5Characters: true
+ ignoreStringsRegex: '$^'
+ TooManyFunctions:
+ active: true
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ thresholdInFiles: 40
+ thresholdInClasses: 40
+ thresholdInInterfaces: 40
+ thresholdInObjects: 40
+ thresholdInEnums: 40
+ ignoreDeprecated: false
+ ignorePrivate: false
+ ignoreOverridden: false
-exceptions:
+coroutines:
active: true
- ExceptionRaisedInUnexpectedLocation:
+ GlobalCoroutineUsage:
active: false
- methodNames: 'toString,hashCode,equals,finalize'
- SwallowedException:
+ RedundantSuspendModifier:
active: false
- TooGenericExceptionCaught:
- active: true
- exceptions:
- - ArrayIndexOutOfBoundsException
- - Error
- - Exception
- - IllegalMonitorStateException
- - IndexOutOfBoundsException
- - InterruptedException
- - NullPointerException
- - RuntimeException
- TooGenericExceptionThrown:
- active: true
- exceptions:
- - Throwable
- - ThrowError
- - ThrowException
- - ThrowNullPointerException
- - ThrowRuntimeException
- - ThrowThrowable
- InstanceOfCheckForException:
+ SleepInsteadOfDelay:
active: false
- IteratorNotThrowingNoSuchElementException:
- active: false
- PrintExceptionStackTrace:
- active: false
- RethrowCaughtException:
- active: false
- ReturnFromFinally:
- active: false
- ThrowingExceptionFromFinally:
- active: false
- ThrowingExceptionInMain:
- active: false
- ThrowingNewInstanceOfSameException:
+ SuspendFunWithFlowReturnType:
active: false
empty-blocks:
active: true
EmptyCatchBlock:
active: true
+ allowedExceptionNameRegex: '_|(ignore|expected).*'
EmptyClassBlock:
active: true
EmptyDefaultConstructor:
@@ -128,198 +179,620 @@ empty-blocks:
active: true
EmptyFunctionBlock:
active: true
+ ignoreOverridden: false
EmptyIfBlock:
active: true
EmptyInitBlock:
active: true
+ EmptyKtFile:
+ active: true
EmptySecondaryConstructor:
active: true
+ EmptyTryBlock:
+ active: true
EmptyWhenBlock:
active: true
EmptyWhileBlock:
active: true
-complexity:
+exceptions:
active: true
- LongMethod:
- threshold: 20
- LongParameterList:
- threshold: 5
- LargeClass:
- threshold: 150
- ComplexMethod:
- threshold: 10
- TooManyFunctions:
- threshold: 40
- ComplexCondition:
- threshold: 5
- LabeledExpression:
- active: false
- StringLiteralDuplication:
+ ExceptionRaisedInUnexpectedLocation:
active: true
- threshold: 6
- ignoreAnnotation: true
- excludeStringsWithLessThan5Characters: true
- ignoreStringsRegex: '$^'
-
-code-smell:
- active: true
- FeatureEnvy:
- threshold: 0.5
- weight: 0.45
- base: 0.5
+ methodNames:
+ - 'equals'
+ - 'finalize'
+ - 'hashCode'
+ - 'toString'
+ InstanceOfCheckForException:
+ active: false
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ NotImplementedDeclaration:
+ active: false
+ ObjectExtendsThrowable:
+ active: false
+ PrintStackTrace:
+ active: true
+ RethrowCaughtException:
+ active: true
+ ReturnFromFinally:
+ active: true
+ ignoreLabeled: false
+ SwallowedException:
+ active: false
+ ignoredExceptionTypes:
+ - 'InterruptedException'
+ - 'MalformedURLException'
+ - 'NumberFormatException'
+ - 'ParseException'
+ allowedExceptionNameRegex: '_|(ignore|expected).*'
+ ThrowingExceptionFromFinally:
+ active: true
+ ThrowingExceptionInMain:
+ active: false
+ ThrowingExceptionsWithoutMessageOrCause:
+ active: true
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ exceptions:
+ - 'ArrayIndexOutOfBoundsException'
+ - 'Exception'
+ - 'IllegalArgumentException'
+ - 'IllegalMonitorStateException'
+ - 'IllegalStateException'
+ - 'IndexOutOfBoundsException'
+ - 'NullPointerException'
+ - 'RuntimeException'
+ - 'Throwable'
+ ThrowingNewInstanceOfSameException:
+ active: true
+ TooGenericExceptionCaught:
+ active: true
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ exceptionNames:
+ - 'ArrayIndexOutOfBoundsException'
+ - 'Error'
+ - 'Exception'
+ - 'IllegalMonitorStateException'
+ - 'IndexOutOfBoundsException'
+ - 'NullPointerException'
+ - 'RuntimeException'
+ - 'Throwable'
+ allowedExceptionNameRegex: '_|(ignore|expected).*'
+ TooGenericExceptionThrown:
+ active: true
+ exceptionNames:
+ - 'Error'
+ - 'Exception'
+ - 'RuntimeException'
+ - 'Throwable'
formatting:
active: true
- useTabs: true
+ android: false
+ autoCorrect: true
+ AnnotationOnSeparateLine:
+ active: false
+ autoCorrect: true
+ AnnotationSpacing:
+ active: false
+ autoCorrect: true
+ ArgumentListWrapping:
+ active: false
+ autoCorrect: true
+ indentSize: 4
+ maxLineLength: 120
+ ChainWrapping:
+ active: true
+ autoCorrect: true
+ CommentSpacing:
+ active: true
+ autoCorrect: true
+ EnumEntryNameCase:
+ active: false
+ autoCorrect: true
+ Filename:
+ active: true
+ FinalNewline:
+ active: true
+ autoCorrect: true
+ insertFinalNewLine: true
+ ImportOrdering:
+ active: false
+ autoCorrect: true
+ layout: '*,java.**,javax.**,kotlin.**,^'
Indentation:
active: false
+ autoCorrect: true
indentSize: 4
- ConsecutiveBlankLines:
+ continuationIndentSize: 4
+ MaximumLineLength:
+ active: false
+ maxLineLength: 120
+ ignoreBackTickedIdentifier: false
+ ModifierOrdering:
active: true
autoCorrect: true
- MultipleSpaces:
+ MultiLineIfElse:
active: true
autoCorrect: true
- SpacingAfterComma:
+ NoBlankLineBeforeRbrace:
active: true
autoCorrect: true
- SpacingAfterKeyword:
+ NoConsecutiveBlankLines:
active: true
autoCorrect: true
+ NoEmptyClassBody:
+ active: true
+ autoCorrect: true
+ NoEmptyFirstLineInMethodBlock:
+ active: false
+ autoCorrect: true
+ NoLineBreakAfterElse:
+ active: true
+ autoCorrect: true
+ NoLineBreakBeforeAssignment:
+ active: true
+ autoCorrect: true
+ NoMultipleSpaces:
+ active: true
+ autoCorrect: true
+ NoSemicolons:
+ active: true
+ autoCorrect: true
+ NoTrailingSpaces:
+ active: true
+ autoCorrect: true
+ NoUnitReturn:
+ active: true
+ autoCorrect: true
+ NoUnusedImports:
+ active: true
+ autoCorrect: true
+ NoWildcardImports:
+ active: true
+ PackageName:
+ active: true
+ autoCorrect: true
+ ParameterListWrapping:
+ active: true
+ autoCorrect: true
+ indentSize: 4
+ maxLineLength: 120
+ SpacingAroundAngleBrackets:
+ active: false
+ autoCorrect: true
SpacingAroundColon:
active: true
autoCorrect: true
- SpacingAroundCurlyBraces:
+ SpacingAroundComma:
active: true
autoCorrect: true
- SpacingAroundOperator:
+ SpacingAroundCurly:
active: true
autoCorrect: true
- TrailingSpaces:
+ SpacingAroundDot:
active: true
autoCorrect: true
- UnusedImports:
- active: true
- autoCorrect: true
- OptionalSemicolon:
- active: true
- autoCorrect: true
- OptionalUnit:
- active: true
- autoCorrect: true
- ExpressionBodySyntax:
+ SpacingAroundDoubleColon:
active: false
autoCorrect: true
- ExpressionBodySyntaxLineBreaks:
- active: false
- autoCorrect: true
- OptionalReturnKeyword:
+ SpacingAroundKeyword:
active: true
autoCorrect: true
+ SpacingAroundOperators:
+ active: true
+ autoCorrect: true
+ SpacingAroundParens:
+ active: true
+ autoCorrect: true
+ SpacingAroundRangeOperator:
+ active: true
+ autoCorrect: true
+ SpacingAroundUnaryOperator:
+ active: false
+ autoCorrect: true
+ SpacingBetweenDeclarationsWithAnnotations:
+ active: false
+ autoCorrect: true
+ SpacingBetweenDeclarationsWithComments:
+ active: false
+ autoCorrect: true
+ StringTemplate:
+ active: true
+ autoCorrect: true
+
+naming:
+ active: true
+ BooleanPropertyNaming:
+ active: false
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ allowedPattern: '^(is|has|are)'
+ ClassNaming:
+ active: true
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ classPattern: '[A-Z][a-zA-Z0-9]*'
+ ConstructorParameterNaming:
+ active: true
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ parameterPattern: '[a-z][A-Za-z0-9]*'
+ privateParameterPattern: '[a-z][A-Za-z0-9]*'
+ excludeClassPattern: '$^'
+ ignoreOverridden: true
+ EnumNaming:
+ active: true
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ enumEntryPattern: '[A-Z][_a-zA-Z0-9]*'
+ ForbiddenClassName:
+ active: false
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ forbiddenName: []
+ FunctionMaxLength:
+ active: false
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ maximumFunctionNameLength: 30
+ FunctionMinLength:
+ active: false
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ minimumFunctionNameLength: 3
+ FunctionNaming:
+ active: true
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ functionPattern: '([a-z][a-zA-Z0-9]*)|(`.*`)'
+ excludeClassPattern: '$^'
+ ignoreOverridden: true
+ ignoreAnnotated:
+ - 'Composable'
+ FunctionParameterNaming:
+ active: true
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ parameterPattern: '[a-z][A-Za-z0-9]*'
+ excludeClassPattern: '$^'
+ ignoreOverridden: true
+ InvalidPackageDeclaration:
+ active: false
+ excludes: ['**/*.kts']
+ rootPackage: ''
+ MatchingDeclarationName:
+ active: true
+ mustBeFirst: true
+ MemberNameEqualsClassName:
+ active: true
+ ignoreOverridden: true
+ NoNameShadowing:
+ active: false
+ NonBooleanPropertyPrefixedWithIs:
+ active: false
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ ObjectPropertyNaming:
+ active: true
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ constantPattern: '[A-Za-z][_A-Za-z0-9]*'
+ propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
+ privatePropertyPattern: '(_)?[A-Za-z][_A-Za-z0-9]*'
+ PackageNaming:
+ active: true
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ packagePattern: '[a-z]+(\.[a-z][A-Za-z0-9]*)*'
+ TopLevelPropertyNaming:
+ active: true
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ constantPattern: '[A-Z][_A-Z0-9]*'
+ propertyPattern: '[A-Za-z][_A-Za-z0-9]*'
+ privatePropertyPattern: '_?[A-Za-z][_A-Za-z0-9]*'
+ VariableMaxLength:
+ active: false
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ maximumVariableNameLength: 64
+ VariableMinLength:
+ active: false
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ minimumVariableNameLength: 1
+ VariableNaming:
+ active: true
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ variablePattern: '[a-z][A-Za-z0-9]*'
+ privateVariablePattern: '(_)?[a-z][A-Za-z0-9]*'
+ excludeClassPattern: '$^'
+ ignoreOverridden: true
+
+performance:
+ active: true
+ ArrayPrimitive:
+ active: true
+ ForEachOnRange:
+ active: true
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ SpreadOperator:
+ active: true
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ UnnecessaryTemporaryInstantiation:
+ active: true
+
+potential-bugs:
+ active: true
+ AvoidReferentialEquality:
+ active: false
+ forbiddenTypePatterns:
+ - 'kotlin.String'
+ CastToNullableType:
+ active: false
+ Deprecation:
+ active: false
+ DontDowncastCollectionTypes:
+ active: false
+ DoubleMutabilityForCollection:
+ active: false
+ DuplicateCaseInWhenExpression:
+ active: true
+ EqualsAlwaysReturnsTrueOrFalse:
+ active: true
+ EqualsWithHashCodeExist:
+ active: true
+ ExitOutsideMain:
+ active: false
+ ExplicitGarbageCollectionCall:
+ active: true
+ HasPlatformType:
+ active: false
+ IgnoredReturnValue:
+ active: false
+ restrictToAnnotatedMethods: true
+ returnValueAnnotations:
+ - '*.CheckResult'
+ - '*.CheckReturnValue'
+ ignoreReturnValueAnnotations:
+ - '*.CanIgnoreReturnValue'
+ ImplicitDefaultLocale:
+ active: true
+ ImplicitUnitReturnType:
+ active: false
+ allowExplicitReturnType: true
+ InvalidRange:
+ active: true
+ IteratorHasNextCallsNextMethod:
+ active: true
+ IteratorNotThrowingNoSuchElementException:
+ active: true
+ LateinitUsage:
+ active: false
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ excludeAnnotatedProperties: []
+ ignoreOnClassesPattern: ''
+ MapGetWithNotNullAssertionOperator:
+ active: false
+ MissingWhenCase:
+ active: true
+ allowElseExpression: true
+ NullableToStringCall:
+ active: false
+ RedundantElseInWhen:
+ active: true
+ UnconditionalJumpStatementInLoop:
+ active: false
+ UnnecessaryNotNullOperator:
+ active: true
+ UnnecessarySafeCall:
+ active: true
+ UnreachableCatchBlock:
+ active: false
+ UnreachableCode:
+ active: true
+ UnsafeCallOnNullableType:
+ active: true
+ UnsafeCast:
+ active: true
+ UnusedUnaryOperator:
+ active: false
+ UselessPostfixExpression:
+ active: false
+ WrongEqualsTypeParameter:
+ active: true
style:
active: true
- ReturnCount:
- active: true
- max: 2
- NewLineAtEndOfFile:
+ ClassOrdering:
active: false
- OptionalAbstractKeyword:
- active: true
- OptionalWhenBraces:
- active: false
- EqualsNullCall:
- active: true
- ForbiddenComment:
- active: true
- values: 'TODO:,FIXME:,STOPSHIP:'
- ForbiddenImport:
- active: false
- imports: ''
- PackageDeclarationStyle:
- active: false
- ModifierOrder:
- active: true
- MagicNumber:
- active: false
- ignoreNumbers: '-1,0,1,2'
- ignoreHashCodeFunction: false
- ignorePropertyDeclaration: true
- ignoreAnnotation: false
- WildcardImport:
- active: false
- SafeCast:
- active: true
- MaxLineLength:
- active: false
- maxLineLength: 120
- excludePackageStatements: false
- excludeImportStatements: false
- PackageNaming:
- active: true
- packagePattern: '^[a-z]+(\.[a-z][a-z0-9]*)*$'
- ClassNaming:
- active: true
- classPattern: '[A-Z$][a-zA-Z$]*'
- EnumNaming:
- active: true
- enumEntryPattern: '^[A-Z$][a-zA-Z_$]*$'
- FunctionNaming:
- active: true
- functionPattern: '^[a-z$][a-zA-Z$0-9]*$'
- FunctionMaxLength:
- active: true
- maximumFunctionNameLength: 30
- FunctionMinLength:
- active: true
- minimumFunctionNameLength: 3
- VariableNaming:
- active: true
- variablePattern: '^(_)?[a-z$][a-zA-Z$0-9]*$'
- ConstantNaming:
- active: true
- constantPattern: '^([A-Z_]*|serialVersionUID)$'
- VariableMaxLength:
- active: true
- maximumVariableNameLength: 30
- VariableMinLength:
- active: true
- minimumVariableNameLength: 3
- ForbiddenClassName:
- active: false
- forbiddenName: ''
- ProtectedMemberInFinalClass:
- active: false
- UnnecessaryParentheses:
+ CollapsibleIfStatements:
active: false
DataClassContainsFunctions:
active: false
+ conversionFunctionPrefix: 'to'
+ DataClassShouldBeImmutable:
+ active: false
+ DestructuringDeclarationWithTooManyEntries:
+ active: false
+ maxDestructuringEntries: 3
+ EqualsNullCall:
+ active: true
+ EqualsOnSignatureLine:
+ active: false
+ ExplicitCollectionElementAccessMethod:
+ active: false
+ ExplicitItLambdaParameter:
+ active: false
+ ExpressionBodySyntax:
+ active: false
+ includeLineWrapping: false
+ ForbiddenComment:
+ active: true
+ values:
+ - 'FIXME:'
+ - 'STOPSHIP:'
+ - 'TODO:'
+ allowedPatterns: ''
+ ForbiddenImport:
+ active: false
+ imports: []
+ forbiddenPatterns: ''
+ ForbiddenMethodCall:
+ active: false
+ methods:
+ - 'kotlin.io.print'
+ - 'kotlin.io.println'
+ ForbiddenPublicDataClass:
+ active: true
+ excludes: ['**']
+ ignorePackages:
+ - '*.internal'
+ - '*.internal.*'
+ ForbiddenVoid:
+ active: false
+ ignoreOverridden: false
+ ignoreUsageInGenerics: false
+ FunctionOnlyReturningConstant:
+ active: true
+ ignoreOverridableFunction: true
+ ignoreActualFunction: true
+ excludedFunctions: ''
+ excludeAnnotatedFunction:
+ - 'dagger.Provides'
+ LibraryCodeMustSpecifyReturnType:
+ active: true
+ excludes: ['**']
+ LibraryEntitiesShouldNotBePublic:
+ active: true
+ excludes: ['**']
+ LoopWithTooManyJumpStatements:
+ active: true
+ maxJumpCount: 1
+ MagicNumber:
+ active: false
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ ignoreNumbers:
+ - '-1'
+ - '0'
+ - '1'
+ - '2'
+ ignoreHashCodeFunction: true
+ ignorePropertyDeclaration: false
+ ignoreLocalVariableDeclaration: false
+ ignoreConstantDeclaration: true
+ ignoreCompanionObjectPropertyDeclaration: true
+ ignoreAnnotation: false
+ ignoreNamedArgument: true
+ ignoreEnums: false
+ ignoreRanges: false
+ ignoreExtensionFunctions: true
+ MandatoryBracesIfStatements:
+ active: false
+ MandatoryBracesLoops:
+ active: false
+ MaxLineLength:
+ active: false
+ maxLineLength: 120
+ excludePackageStatements: true
+ excludeImportStatements: true
+ excludeCommentStatements: false
+ MayBeConst:
+ active: true
+ ModifierOrder:
+ active: true
+ MultilineLambdaItParameter:
+ active: false
+ NestedClassesVisibility:
+ active: true
+ NewLineAtEndOfFile:
+ active: true
+ NoTabs:
+ active: false
+ ObjectLiteralToLambda:
+ active: false
+ OptionalAbstractKeyword:
+ active: true
+ OptionalUnit:
+ active: false
+ OptionalWhenBraces:
+ active: false
+ PreferToOverPairSyntax:
+ active: false
+ ProtectedMemberInFinalClass:
+ active: true
+ RedundantExplicitType:
+ active: false
+ RedundantHigherOrderMapUsage:
+ active: false
+ RedundantVisibilityModifierRule:
+ active: false
+ ReturnCount:
+ active: true
+ max: 2
+ excludedFunctions: 'equals'
+ excludeLabeled: false
+ excludeReturnFromLambda: true
+ excludeGuardClauses: false
+ SafeCast:
+ active: true
+ SerialVersionUIDInSerializableClass:
+ active: true
+ SpacingBetweenPackageAndImports:
+ active: false
+ ThrowsCount:
+ active: true
+ max: 2
+ excludeGuardClauses: false
+ TrailingWhitespace:
+ active: false
+ UnderscoresInNumericLiterals:
+ active: false
+ acceptableDecimalLength: 5
+ UnnecessaryAbstractClass:
+ active: true
+ excludeAnnotatedClasses:
+ - 'dagger.Module'
+ UnnecessaryAnnotationUseSiteTarget:
+ active: false
+ UnnecessaryApply:
+ active: true
+ UnnecessaryFilter:
+ active: false
+ UnnecessaryInheritance:
+ active: true
+ UnnecessaryLet:
+ active: false
+ UnnecessaryParentheses:
+ active: false
+ UntilInsteadOfRangeTo:
+ active: false
+ UnusedImports:
+ active: false
+ UnusedPrivateClass:
+ active: true
+ UnusedPrivateMember:
+ active: true
+ allowedNames: '(_|ignored|expected|serialVersionUID)'
+ UseArrayLiteralsInAnnotations:
+ active: false
+ UseCheckNotNull:
+ active: false
+ UseCheckOrError:
+ active: false
UseDataClass:
active: false
- UnnecessaryAbstractClass:
+ excludeAnnotatedClasses: []
+ allowVars: false
+ UseEmptyCounterpart:
active: false
-
-comments:
- active: true
- CommentOverPrivateMethod:
+ UseIfEmptyOrIfBlank:
+ active: false
+ UseIfInsteadOfWhen:
+ active: false
+ UseIsNullOrEmpty:
+ active: false
+ UseOrEmpty:
+ active: false
+ UseRequire:
+ active: false
+ UseRequireNotNull:
+ active: false
+ UselessCallOnNotNull:
active: true
- CommentOverPrivateProperty:
+ UtilityClassWithPublicConstructor:
active: true
- UndocumentedPublicClass:
+ VarCouldBeVal:
+ active: true
+ WildcardImport:
active: false
- searchInNestedClass: true
- searchInInnerClass: true
- searchInInnerObject: true
- searchInInnerInterface: true
- UndocumentedPublicFunction:
- active: false
-
-# *experimental feature*
-# Migration rules can be defined in the same config file or a new one
-migration:
- active: true
- imports:
- # your.package.Class: new.package.or.Class
- # for example:
- # io.gitlab.arturbosch.detekt.api.Rule: io.gitlab.arturbosch.detekt.rule.Rule
+ excludes: ['**/test/**', '**/androidTest/**', '**/commonTest/**', '**/jvmTest/**', '**/jsTest/**', '**/iosTest/**']
+ excludeImports:
+ - 'java.util.*'
+ - 'kotlinx.android.synthetic.*'
diff --git a/detekt_baseline.xml b/detekt_baseline.xml
index ad26c349e..08d2c4451 100644
--- a/detekt_baseline.xml
+++ b/detekt_baseline.xml
@@ -1,7 +1,64 @@
-
-
+
+
+ ComplexCondition:AutocompleteAdapter.kt$AutocompleteAdapter.<no name provided>$constraint[0] == '@' && constraint.length >= 3 && socialRepository != null && remoteAutocomplete
+ ComplexCondition:AvatarStatsWidgetProvider.kt$AvatarStatsWidgetProvider$showManaBar && (stats.habitClass == null || (stats.lvl ?: 0) < 10 || user.preferences?.disableClasses == true)
+ ComplexCondition:AvatarStatsWidgetProvider.kt$AvatarStatsWidgetProvider$user == null || stats == null || context == null || appWidgetManager == null
+ ComplexCondition:BaseDialogFragment.kt$BaseDialogFragment$step != null && step.isValid && step.isManaged && step.shouldDisplay()
+ ComplexCondition:BaseFragment.kt$BaseFragment$step != null && step.isValid && step.isManaged && step.shouldDisplay()
+ ComplexCondition:ChallengeListFragment.kt$ChallengeListFragment$(!forced && binding?.refreshLayout?.isRefreshing == true) || loadedAllData || !this::challengeRepository.isInitialized
+ ComplexCondition:ChatRecyclerViewHolder.kt$ChatRecyclerMessageViewHolder$(name != null && msg.text?.contains("@$name") == true) || (username != null && msg.text?.contains(username) == true)
+ ComplexCondition:HabitViewHolder.kt$HabitViewHolder$data.counterUp != null && data.counterUp ?: 0 > 0 && data.counterDown != null && data.counterDown ?: 0 > 0
+ ComplexCondition:LoginActivity.kt$LoginActivity$username.isEmpty() || password.isEmpty() || email.isEmpty() || confirmPassword.isEmpty()
+ ComplexCondition:LoginBackgroundView.kt$LoginBackgroundView$viewWidth <= 0 || viewHeight <= 0 || didLayoutStars || starViews?.size == 0
+ ComplexCondition:NavigationDrawerFragment.kt$NavigationDrawerFragment$adapter.selectedItem != null && adapter.selectedItem == transitionId && bundle == null && preventReselection
+ ComplexCondition:PurchaseDialog.kt$PurchaseDialog$(shopItem.currency != "gold" || shopItem.canAfford(user, purchaseQuantity)) && !shopItem.locked && purchaseQuantity >= 1
+ ComplexCondition:PurchaseDialog.kt$PurchaseDialog$shopIdentifier != null && shopIdentifier == Shop.TIME_TRAVELERS_SHOP || "mystery_set" == shopItem.purchaseType || shopItem.currency == "hourglasses"
+ ComplexCondition:PushNotificationManager.kt$PushNotificationManager$this.refreshedToken.isEmpty() || this.user == null || this.userHasPushDevice() || !this.userIsSubscribedToNotifications()
+ ComplexCondition:QuestProgressView.kt$QuestProgressView$quest == null || progress == null || !quest.isValid || !progress.isValid
+ ComplexCondition:RealmTaskLocalRepository.kt$RealmTaskLocalRepository$firstTask != null && secondTask != null && firstTask.isValid && secondTask.isValid
+ ComplexCondition:RxErrorHandler.kt$RxErrorHandler.Companion$!IOException::class.java.isAssignableFrom(throwable.javaClass) && !HttpException::class.java.isAssignableFrom(throwable.javaClass) && !retrofit2.HttpException::class.java.isAssignableFrom(throwable.javaClass) && !EOFException::class.java.isAssignableFrom(throwable.javaClass) && throwable !is ConnectionShutdownException
+ ComplexCondition:SafeDefaultItemAnimator.kt$SafeDefaultItemAnimator$!removalsPending && !movesPending && !additionsPending && !changesPending
+ ComplexCondition:SubscriptionFragment.kt$SubscriptionFragment$user?.purchased?.plan?.paymentMethod == "Google" && user?.purchased?.plan?.isActive == true && user?.purchased?.plan?.dateTerminated == null && (purchasedSubscription?.autoRenewing == false || purchasedSubscription == null)
+ ComplexMethod:AvatarStatsWidgetProvider.kt$AvatarStatsWidgetProvider$private fun updateData(user: User?)
+ ComplexMethod:AvatarView.kt$AvatarView$@Suppress("ReturnCount") private fun getAvatarLayerMap(avatar: Avatar, substitutions: Map<String, Map<String, String>>): EnumMap<LayerType, String>
+ ComplexMethod:AvatarView.kt$AvatarView$private fun getLayerBounds(layerType: LayerType, layerName: String, drawable: Drawable): Rect
+ ComplexMethod:BaseActivity.kt$BaseActivity$internal open fun loadTheme(sharedPreferences: SharedPreferences, forced: Boolean = false)
+ ComplexMethod:BaseTaskViewHolder.kt$BaseTaskViewHolder$override fun bind(data: Task, position: Int, displayMode: String)
+ ComplexMethod:ChatMessageDeserializer.kt$ChatMessageDeserializer$@Throws(JsonParseException::class) override fun deserialize(json: JsonElement, typeOfT: Type, context: JsonDeserializationContext): ChatMessage
+ ComplexMethod:ChatRecyclerViewHolder.kt$ChatRecyclerMessageViewHolder$fun bind(msg: ChatMessage, uuid: String, user: User?, isExpanded: Boolean)
+ ComplexMethod:ChecklistedViewHolder.kt$ChecklistedViewHolder$private fun updateChecklistDisplay()
+ ComplexMethod:CustomizationSetupAdapter.kt$CustomizationSetupAdapter$private fun isCustomizationActive(customization: SetupCustomization): Boolean
+ ComplexMethod:DeviceName.kt$DeviceName$ fun getDeviceName(codename: String?, model: String?, fallback: String?): String?
+ ComplexMethod:GroupSerialization.kt$GroupSerialization$@Throws(JsonParseException::class) override fun deserialize(json: JsonElement, typeOfT: Type, context: JsonDeserializationContext): Group
+ ComplexMethod:HabitViewHolder.kt$HabitViewHolder$override fun bind(data: Task, position: Int, displayMode: String)
+ ComplexMethod:ItemRecyclerAdapter.kt$ItemRecyclerAdapter.ItemViewHolder$override fun onClick(v: View)
+ ComplexMethod:LocalNotificationActionReceiver.kt$LocalNotificationActionReceiver$private fun handleLocalNotificationAction(action: String?)
+ ComplexMethod:MemberSerialization.kt$MemberSerialization$@Throws(JsonParseException::class) override fun deserialize(json: JsonElement, typeOfT: Type, context: JsonDeserializationContext): Member
+ ComplexMethod:NavigationDrawerFragment.kt$NavigationDrawerFragment$private fun updateUser(user: User)
+ ComplexMethod:Notification.kt$Notification$fun getDataType(): java.lang.reflect.Type?
+ ComplexMethod:NotificationsManager.kt$NotificationsManager$private fun handlePopupNotifications(notifications: List<Notification>): Boolean?
+ ComplexMethod:PetSuggestHatchDialog.kt$PetSuggestHatchDialog$fun configure(pet: Animal, egg: Egg?, potion: HatchingPotion?, eggCount: Int, potionCount: Int, hasUnlockedEgg: Boolean, hasUnlockedPotion: Boolean, hasMount: Boolean)
+ ComplexMethod:PreferencesFragment.kt$PreferencesFragment$override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences, key: String)
+ ComplexMethod:PurchaseDialog.kt$PurchaseDialog$private fun buyItem(quantity: Int)
+ ComplexMethod:SafeDefaultItemAnimator.kt$SafeDefaultItemAnimator$override fun runPendingAnimations()
+ ComplexMethod:SetupCustomizationRepositoryImpl.kt$SetupCustomizationRepositoryImpl$override fun getCustomizations(type: String, subtype: String?, user: User): List<SetupCustomization>
+ ComplexMethod:StableRecyclerFragment.kt$StableRecyclerFragment$private fun mapAnimals(unsortedAnimals: List<Animal>, ownedAnimals: Map<String, OwnedObject>): ArrayList<Any>
+ ComplexMethod:StatsFragment.kt$StatsFragment$private fun updateStats(user: User)
+ ComplexMethod:SubscriptionDetailsView.kt$SubscriptionDetailsView$fun setPlan(plan: SubscriptionPlan)
+ ComplexMethod:TaskFormActivity.kt$TaskFormActivity$override fun onCreate(savedInstanceState: Bundle?)
+ ComplexMethod:TaskFormActivity.kt$TaskFormActivity$private fun fillForm(task: Task)
+ ComplexMethod:TaskRepositoryImpl.kt$TaskRepositoryImpl$@Suppress("ReturnCount") override fun taskChecked(user: User?, task: Task, up: Boolean, force: Boolean, notifyFunc: ((TaskScoringResult) -> Unit)?): Flowable<TaskScoringResult?>
+ ComplexMethod:TaskRepositoryImpl.kt$TaskRepositoryImpl$private fun handleTaskResponse(user: User, res: TaskDirectionData, task: Task, up: Boolean, localDelta: Float)
+ ComplexMethod:TaskSchedulingControls.kt$TaskSchedulingControls$private fun generateSummary()
+ ComplexMethod:TaskSerializer.kt$TaskSerializer$override fun deserialize(json: JsonElement?, typeOfT: Type?, context: JsonDeserializationContext): Task
+ ComplexMethod:UserDeserializer.kt$UserDeserializer$@Throws(JsonParseException::class) override fun deserialize(json: JsonElement, typeOfT: Type, context: JsonDeserializationContext): User
+ ComplexMethod:UserStatComputer.kt$UserStatComputer$fun computeClassBonus(equipmentList: List<Equipment>, user: Avatar): List<StatsRow>
+ ComplexMethod:WorldStateSerialization.kt$WorldStateSerialization$override fun deserialize(json: JsonElement?, typeOfT: Type?, context: JsonDeserializationContext?): WorldState
+ ConstructorParameterNaming:BoughtGemsEvent.kt$BoughtGemsEvent$var NewGemsToAdd: Int
+ ConstructorParameterNaming:Days.kt$Days$`in`: Parcel
+ ConstructorParameterNaming:Task.kt$Task$`in`: Parcel
DuplicateCaseInWhenExpression:Notification.kt$Notification$when (type) { Type.LOGIN_INCENTIVE.type -> LoginIncentiveData::class.java Type.NEW_STUFF.type -> NewStuffData::class.java Type.NEW_CHAT_MESSAGE.type -> NewChatMessageData::class.java Type.GROUP_TASK_NEEDS_WORK.type -> GroupTaskNeedsWorkData::class.java Type.GROUP_TASK_APPROVED.type -> GroupTaskApprovedData::class.java Type.GROUP_TASK_REQUIRES_APPROVAL.type -> GroupTaskRequiresApprovalData::class.java Type.UNALLOCATED_STATS_POINTS.type -> UnallocatedPointsData::class.java Type.GUILD_INVITATION.type -> GuildInvitationData::class.java Type.PARTY_INVITATION.type -> PartyInvitationData::class.java Type.QUEST_INVITATION.type -> QuestInvitationData::class.java Type.FIRST_DROP.type -> FirstDropData::class.java Type.ACHIEVEMENT_GENERIC.type -> AchievementData::class.java Type.WON_CHALLENGE.type -> ChallengeWonData::class.java Type.ACHIEVEMENT_ALL_YOUR_BASE.type -> AchievementData::class.java Type.ACHIEVEMENT_BACK_TO_BASICS.type -> AchievementData::class.java Type.ACHIEVEMENT_JUST_ADD_WATER.type -> AchievementData::class.java Type.ACHIEVEMENT_LOST_MASTERCLASSER.type -> AchievementData::class.java Type.ACHIEVEMENT_MIND_OVER_MATTER.type -> AchievementData::class.java Type.ACHIEVEMENT_DUST_DEVIL.type -> AchievementData::class.java Type.ACHIEVEMENT_ARID_AUTHORITY.type -> AchievementData::class.java Type.ACHIEVEMENT_MONSTER_MAGUS.type -> AchievementData::class.java Type.ACHIEVEMENT_UNDEAD_UNDERTAKER.type -> AchievementData::class.java Type.ACHIEVEMENT_PRIMED_FOR_PAINTING.type -> AchievementData::class.java Type.ACHIEVEMENT_PEARLY_PRO.type -> AchievementData::class.java Type.ACHIEVEMENT_TICKLED_PINK.type -> AchievementData::class.java Type.ACHIEVEMENT_ROSY_OUTLOOK.type -> AchievementData::class.java Type.ACHIEVEMENT_BUG_BONANZA.type -> AchievementData::class.java Type.ACHIEVEMENT_BARE_NECESSITIES.type -> AchievementData::class.java Type.ACHIEVEMENT_FRESHWATER_FRIENDS.type -> AchievementData::class.java Type.ACHIEVEMENT_GOOD_AS_GOLD.type -> AchievementData::class.java Type.ACHIEVEMENT_ALL_THAT_GLITTERS.type -> AchievementData::class.java Type.ACHIEVEMENT_GOOD_AS_GOLD.type -> AchievementData::class.java Type.ACHIEVEMENT_BONE_COLLECTOR.type -> AchievementData::class.java Type.ACHIEVEMENT_SKELETON_CREW.type -> AchievementData::class.java Type.ACHIEVEMENT_SEEING_RED.type -> AchievementData::class.java Type.ACHIEVEMENT_RED_LETTER_DAY.type -> AchievementData::class.java else -> null }
DuplicateCaseInWhenExpression:NotificationsManager.kt$NotificationsManager$when (it.type) { Notification.Type.LOGIN_INCENTIVE.type -> displayLoginIncentiveNotification(it) Notification.Type.ACHIEVEMENT_PARTY_UP.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_PARTY_ON.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_BEAST_MASTER.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_MOUNT_MASTER.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_TRIAD_BINGO.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_GUILD_JOINED.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_CHALLENGE_JOINED.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_INVITED_FRIEND.type -> displayAchievementNotification(it) Notification.Type.WON_CHALLENGE.type -> displayWonChallengeNotificaiton(it) Notification.Type.ACHIEVEMENT_ALL_YOUR_BASE.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_BACK_TO_BASICS.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_JUST_ADD_WATER.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_LOST_MASTERCLASSER.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_MIND_OVER_MATTER.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_DUST_DEVIL.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_ARID_AUTHORITY.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_MONSTER_MAGUS.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_UNDEAD_UNDERTAKER.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_PRIMED_FOR_PAINTING.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_PEARLY_PRO.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_TICKLED_PINK.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_ROSY_OUTLOOK.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_BUG_BONANZA.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_BARE_NECESSITIES.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_FRESHWATER_FRIENDS.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_GOOD_AS_GOLD.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_ALL_THAT_GLITTERS.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_GOOD_AS_GOLD.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_BONE_COLLECTOR.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_SKELETON_CREW.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_SEEING_RED.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_RED_LETTER_DAY.type -> displayAchievementNotification(it) Notification.Type.ACHIEVEMENT_GENERIC.type -> displayAchievementNotification( it, notifications.find { notif -> notif.type == Notification.Type.ACHIEVEMENT_ONBOARDING_COMPLETE.type } != null ) Notification.Type.ACHIEVEMENT_ONBOARDING_COMPLETE.type -> displayAchievementNotification(it) Notification.Type.FIRST_DROP.type -> displayFirstDropNotification(it) else -> false }
EmptyCatchBlock:AmplitudeManager.kt$AmplitudeManager${ }
@@ -16,6 +73,77 @@
EmptyFunctionBlock:SpookyExtraGemsHabiticaPromotion.kt$SpookyExtraGemsHabiticaPromotion${ }
EmptyFunctionBlock:Survey2021Promotion.kt$Survey2021Promotion${ }
EmptySecondaryConstructor:Server.kt$Server${}
+ FunctionParameterNaming:BaseLocalRepository.kt$BaseLocalRepository$`object`: T
+ FunctionParameterNaming:DragLinearLayout.kt$DragLinearLayout.Companion$`val`: Float
+ FunctionParameterNaming:FullProfileActivity.kt$FullProfileActivity$`val`: Float
+ LargeClass:MainActivity.kt$MainActivity : BaseActivityOnTutorialReaction
+ LongMethod:AvatarView.kt$AvatarView$@Suppress("ReturnCount") private fun getAvatarLayerMap(avatar: Avatar, substitutions: Map<String, Map<String, String>>): EnumMap<LayerType, String>
+ LongMethod:BaseTaskViewHolder.kt$BaseTaskViewHolder$override fun bind(data: Task, position: Int, displayMode: String)
+ LongMethod:ChallengeDetailFragment.kt$ChallengeDetailFragment$@Suppress("ReturnCount") override fun onViewCreated(view: View, savedInstanceState: Bundle?)
+ LongMethod:ChatRecyclerViewHolder.kt$ChatRecyclerMessageViewHolder$fun bind(msg: ChatMessage, uuid: String, user: User?, isExpanded: Boolean)
+ LongMethod:ContentDeserializer.kt$ContentDeserializer$@Throws(JsonParseException::class) override fun deserialize(json: JsonElement, typeOfT: Type, context: JsonDeserializationContext): ContentResult
+ LongMethod:DeviceName.kt$DeviceName$ fun getDeviceName(codename: String?, model: String?, fallback: String?): String?
+ LongMethod:GroupSerialization.kt$GroupSerialization$@Throws(JsonParseException::class) override fun deserialize(json: JsonElement, typeOfT: Type, context: JsonDeserializationContext): Group
+ LongMethod:HabitViewHolder.kt$HabitViewHolder$override fun bind(data: Task, position: Int, displayMode: String)
+ LongMethod:ItemDialogFragment.kt$ItemDialogFragment$override fun onViewCreated(view: View, savedInstanceState: Bundle?)
+ LongMethod:ItemRecyclerFragment.kt$ItemRecyclerFragment$override fun onViewCreated(view: View, savedInstanceState: Bundle?)
+ LongMethod:NavigationDrawerFragment.kt$NavigationDrawerFragment$@OptIn(ExperimentalTime::class) override fun onViewCreated(view: View, savedInstanceState: Bundle?)
+ LongMethod:NavigationDrawerFragment.kt$NavigationDrawerFragment$private fun updateUser(user: User)
+ LongMethod:PetSuggestHatchDialog.kt$PetSuggestHatchDialog$fun configure(pet: Animal, egg: Egg?, potion: HatchingPotion?, eggCount: Int, potionCount: Int, hasUnlockedEgg: Boolean, hasUnlockedPotion: Boolean, hasMount: Boolean)
+ LongMethod:PreferencesFragment.kt$PreferencesFragment$override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences, key: String)
+ LongMethod:SafeDefaultItemAnimator.kt$SafeDefaultItemAnimator$override fun endAnimations()
+ LongMethod:SafeDefaultItemAnimator.kt$SafeDefaultItemAnimator$override fun runPendingAnimations()
+ LongMethod:TaskFormActivity.kt$TaskFormActivity$override fun onCreate(savedInstanceState: Bundle?)
+ LongMethod:UserDeserializer.kt$UserDeserializer$@Throws(JsonParseException::class) override fun deserialize(json: JsonElement, typeOfT: Type, context: JsonDeserializationContext): User
+ LongMethod:UserStatComputer.kt$UserStatComputer$fun computeClassBonus(equipmentList: List<Equipment>, user: Avatar): List<StatsRow>
+ LongParameterList:FullProfileActivity.kt$FullProfileActivity$(label: String, strVal: Float, intVal: Float, conVal: Float, perVal: Float, roundDown: Boolean, isSummary: Boolean)
+ LongParameterList:HabiticaSnackbar.kt$HabiticaSnackbar.Companion$(container: ViewGroup, leftImage: Drawable, title: CharSequence?, content: CharSequence?, displayType: SnackbarDisplayType, isCelebratory: Boolean = false)
+ LongParameterList:HabiticaSnackbar.kt$HabiticaSnackbar.Companion$(container: ViewGroup, leftImage: Drawable?, title: CharSequence?, content: CharSequence?, specialView: View?, rightIcon: Drawable?, rightTextColor: Int, rightText: String?, displayType: SnackbarDisplayType, isCelebratory: Boolean = false)
+ LongParameterList:HabiticaSnackbar.kt$HabiticaSnackbar.Companion$(container: ViewGroup, title: CharSequence?, content: CharSequence?, rightIcon: Drawable, rightTextColor: Int, rightText: String, displayType: SnackbarDisplayType, isCelebratory: Boolean = false)
+ LongParameterList:HabiticaSnackbar.kt$HabiticaSnackbar.Companion$(container: ViewGroup, title: CharSequence?, content: CharSequence?, specialView: View?, displayType: SnackbarDisplayType, isCelebratory: Boolean = false)
+ LongParameterList:NotifyUserUseCase.kt$NotifyUserUseCase.Companion$(context: Context, xp: Double?, hp: Double?, gold: Double?, mp: Double?, questDamage: Double?, user: User?)
+ LongParameterList:NotifyUserUseCase.kt$NotifyUserUseCase.RequestValues$(val context: AppCompatActivity, val snackbarTargetView: ViewGroup, val user: User?, val xp: Double?, val hp: Double?, val gold: Double?, val mp: Double?, val questDamage: Double?, val hasLeveledUp: Boolean?, val level: Int?)
+ LongParameterList:PetSuggestHatchDialog.kt$PetSuggestHatchDialog$(pet: Animal, egg: Egg?, potion: HatchingPotion?, eggCount: Int, potionCount: Int, hasUnlockedEgg: Boolean, hasUnlockedPotion: Boolean, hasMount: Boolean)
+ LongParameterList:PetViewHolder.kt$PetViewHolder$( item: Pet, trained: Int, eggCount: Int, potionCount: Int, canRaiseToMount: Boolean, ownsSaddles: Boolean, hasUnlockedEgg: Boolean, hasUnlockedPotion: Boolean, hasMount: Boolean, user: User? )
+ LongParameterList:ScoreTaskLocallyInteractor.kt$ScoreTaskLocallyInteractor.Companion$(result: TaskDirectionData, delta: Double, stats: Stats, computedStats: Stats, task: Task, direction: TaskDirection)
+ LongParameterList:SocialRepository.kt$SocialRepository$(name: String?, description: String?, leader: String?, type: String?, privacy: String?, leaderCreateChallenge: Boolean?)
+ MatchingDeclarationName:Date-Extensions.kt$DateUtils
+ MayBeConst:PurchaseHandler.kt$PurchaseHandler.Companion$val PURCHASE_REQUEST_CODE = 51966
+ MemberNameEqualsClassName:DeviceName.kt$DeviceName$/** * Get the consumer friendly name of the device. * * @return the market name of the current device. * @see .getDeviceName */ val deviceName: String? get() = getDeviceName(Build.DEVICE, Build.MODEL, Build.MODEL.capitalize(Locale.getDefault()))
+ MemberNameEqualsClassName:DeviceName.kt$DeviceName.Request$ fun request(callback: Callback)
+ MemberNameEqualsClassName:KeyHelper.kt$KeyHelper.Companion$private var keyHelper: KeyHelper? = null
+ MemberNameEqualsClassName:Status.kt$Status$var status: String? = null
+ NestedBlockDepth:AvatarView.kt$AvatarView$private fun getLayerBounds(layerType: LayerType, layerName: String, drawable: Drawable): Rect
+ NestedBlockDepth:BaseTaskViewHolder.kt$BaseTaskViewHolder$override fun bind(data: Task, position: Int, displayMode: String)
+ NestedBlockDepth:BaseTaskViewHolder.kt$BaseTaskViewHolder$override fun onTouch(view: View?, motionEvent: MotionEvent?): Boolean
+ NestedBlockDepth:ChallengeDeserializer.kt$ChallengeDeserializer$@Throws(JsonParseException::class) override fun deserialize(json: JsonElement, typeOfT: Type, context: JsonDeserializationContext): Challenge
+ NestedBlockDepth:ChecklistedViewHolder.kt$ChecklistedViewHolder$private fun updateChecklistDisplay()
+ NestedBlockDepth:CustomizationDeserializer.kt$CustomizationDeserializer$@Throws(JsonParseException::class) override fun deserialize(json: JsonElement, typeOfT: Type, context: JsonDeserializationContext): List<Customization>
+ NestedBlockDepth:DeviceName.kt$DeviceName$ @WorkerThread fun getDeviceInfo(context: Context, codename: String?, model: String?): DeviceInfo
+ NestedBlockDepth:GroupSerialization.kt$GroupSerialization$@Throws(JsonParseException::class) override fun deserialize(json: JsonElement, typeOfT: Type, context: JsonDeserializationContext): Group
+ NestedBlockDepth:GuildDetailFragment.kt$GuildDetailFragment$private fun getGroupChallenges(): List<Challenge>
+ NestedBlockDepth:InsufficientGemsDialog.kt$InsufficientGemsDialog$override fun onAttachedToWindow()
+ NestedBlockDepth:ItemRecyclerAdapter.kt$ItemRecyclerAdapter.ItemViewHolder$override fun onClick(v: View)
+ NestedBlockDepth:MainActivity.kt$MainActivity$private fun setUserData()
+ NestedBlockDepth:MemberSerialization.kt$MemberSerialization$@Throws(JsonParseException::class) override fun deserialize(json: JsonElement, typeOfT: Type, context: JsonDeserializationContext): Member
+ NestedBlockDepth:NavigationDrawerFragment.kt$NavigationDrawerFragment$private fun updateUser(user: User)
+ NestedBlockDepth:PartyDetailFragment.kt$PartyDetailFragment$private fun getGroupChallenges(): List<Challenge>
+ NestedBlockDepth:PartyDetailFragment.kt$PartyDetailFragment$private fun updateUser(user: User?)
+ NestedBlockDepth:PurchaseDialog.kt$PurchaseDialog$private fun onBuyButtonClicked()
+ NestedBlockDepth:QuestDetailFragment.kt$QuestDetailFragment$private fun setQuestParticipants(participants: List<Member>?)
+ NestedBlockDepth:QuestDropItemsListSerialization.kt$QuestDropItemsListSerialization$@Throws(JsonParseException::class) override fun deserialize(json: JsonElement, typeOfT: Type, context: JsonDeserializationContext): RealmList<QuestDropItem>
+ NestedBlockDepth:SafeDefaultItemAnimator.kt$SafeDefaultItemAnimator$override fun endAnimation(item: RecyclerView.ViewHolder)
+ NestedBlockDepth:ShopRecyclerAdapter.kt$ShopRecyclerAdapter$@Suppress("ReturnCount") override fun onBindViewHolder(holder: androidx.recyclerview.widget.RecyclerView.ViewHolder, position: Int)
+ NestedBlockDepth:Task.kt$Task$fun getDaysOfMonth(): List<Int>?
+ NestedBlockDepth:Task.kt$Task$fun getWeeksOfMonth(): List<Int>?
+ NestedBlockDepth:TaskFilterHelper.kt$TaskFilterHelper$fun createQuery(unfilteredData: OrderedRealmCollection<Task>): RealmQuery<Task>?
+ NestedBlockDepth:TaskListDeserializer.kt$TaskListDeserializer$override fun deserialize(json: JsonElement, typeOfT: Type, ctx: JsonDeserializationContext): TaskList
+ NestedBlockDepth:TaskListDeserializer.kt$TaskListDeserializer$private fun handleTags(databaseTags: List<Tag>, json: JsonArray?, context: JsonDeserializationContext): RealmList<Tag>
+ NestedBlockDepth:TaskTagDeserializer.kt$TaskTagDeserializer$@Throws(JsonParseException::class) override fun deserialize(json: JsonElement, typeOfT: Type, context: JsonDeserializationContext): List<Tag>
+ NestedBlockDepth:ToolbarColorHelper.kt$ToolbarColorHelper$ fun colorizeToolbar(toolbar: Toolbar, activity: Activity?, overrideModernHeader: Boolean? = null)
+ NestedBlockDepth:UserDeserializer.kt$UserDeserializer$@Throws(JsonParseException::class) override fun deserialize(json: JsonElement, typeOfT: Type, context: JsonDeserializationContext): User
+ NestedBlockDepth:WorldStateSerialization.kt$WorldStateSerialization$override fun deserialize(json: JsonElement?, typeOfT: Type?, context: JsonDeserializationContext?): WorldState
+ ProtectedMemberInFinalClass:InboxViewModel.kt$InboxViewModel$protected var memberIDSubject = BehaviorSubject.create<Optional<String>>()
ReturnCount:BaseTaskViewHolder.kt$BaseTaskViewHolder$override fun onTouch(view: View?, motionEvent: MotionEvent?): Boolean
ReturnCount:Customization.kt$Customization$fun getImageName(userSize: String?, hairColor: String?): String
ReturnCount:DeviceName.kt$DeviceName$ @WorkerThread fun getDeviceInfo(context: Context, codename: String?, model: String?): DeviceInfo
@@ -31,12 +159,8 @@
ReturnCount:RealmInventoryLocalRepository.kt$RealmInventoryLocalRepository$override fun hatchPet(eggKey: String, potionKey: String, userID: String)
ReturnCount:RealmInventoryLocalRepository.kt$RealmInventoryLocalRepository$override fun unhatchPet(eggKey: String, potionKey: String, userID: String)
ReturnCount:StableRecyclerAdapter.kt$StableRecyclerAdapter$private fun canRaiseToMount(pet: Pet): Boolean
- StringLiteralDuplication:GuildInviteLocalNotification.kt$GuildInviteLocalNotification$"groupID"
- StringLiteralDuplication:RealmInventoryLocalRepository.kt$RealmInventoryLocalRepository$"animal"
- StringLiteralDuplication:RealmSocialLocalRepository.kt$RealmSocialLocalRepository$"userID"
- StringLiteralDuplication:RealmTaskLocalRepository.kt$RealmTaskLocalRepository$"position"
- StringLiteralDuplication:RealmTaskLocalRepository.kt$RealmTaskLocalRepository$"userId"
- StringLiteralDuplication:SafeDefaultItemAnimator.kt$SafeDefaultItemAnimator$"$toX, $fromX, $deltaX"
+ ThrowingExceptionsWithoutMessageOrCause:EllipsisTextView.kt$EllipsisTextView$NullPointerException()
+ ThrowingExceptionsWithoutMessageOrCause:HabiticaPurchaseVerifier.kt$HabiticaPurchaseVerifier$Exception()
TooGenericExceptionCaught:CustomizationDeserializer.kt$CustomizationDeserializer$e: Exception
TooGenericExceptionCaught:DeviceName.kt$DeviceName$e: Exception
TooGenericExceptionCaught:DeviceName.kt$DeviceName.Request.GetDeviceRunnable$e: Exception
@@ -52,10 +176,52 @@
TooGenericExceptionCaught:TaskListDeserializer.kt$TaskListDeserializer$e: RuntimeException
TooGenericExceptionCaught:TaskTagDeserializer.kt$TaskTagDeserializer$e: RuntimeException
TooGenericExceptionCaught:WorldStateSerialization.kt$WorldStateSerialization$e: Exception
- UseIfInsteadOfWhen:MainActivity.kt$MainActivity$when (userQuestStatus) { UserQuestStatus.QUEST_BOSS -> data.questDamage else -> 0.0 }
- UseIfInsteadOfWhen:MountDetailRecyclerAdapter.kt$MountDetailRecyclerAdapter$when (viewType) { 1 -> SectionViewHolder(parent) else -> MountViewHolder(parent, equipEvents) }
- UseIfInsteadOfWhen:PetDetailRecyclerAdapter.kt$PetDetailRecyclerAdapter$when (viewType) { 1 -> SectionViewHolder(parent) else -> PetViewHolder(parent, equipEvents, animalIngredientsRetriever) }
- UseIfInsteadOfWhen:RecyclerViewEmptySupport.kt$RecyclerViewEmptySupport$when (field) { RecyclerViewState.DISPLAYING_DATA -> updateAdapter(actualAdapter) else -> { updateAdapter(emptyAdapter) emptyAdapter.notifyDataSetChanged() } }
- UseIfInsteadOfWhen:ShopItem.kt$ShopItem$when (currency) { "gold" -> (value * quantity) <= (user?.stats?.gp ?: 0.0) else -> true }
-
+ TooManyFunctions:ApiClient.kt$ApiClient
+ TooManyFunctions:ApiClientImpl.kt$ApiClientImpl : ConsumerApiClient
+ TooManyFunctions:ApiService.kt$ApiService
+ TooManyFunctions:InventoryRepository.kt$InventoryRepository : BaseRepository
+ TooManyFunctions:InventoryRepositoryImpl.kt$InventoryRepositoryImpl : BaseRepositoryImplInventoryRepository
+ TooManyFunctions:MainActivity.kt$MainActivity : BaseActivityOnTutorialReaction
+ TooManyFunctions:SocialRepository.kt$SocialRepository : BaseRepository
+ TooManyFunctions:SocialRepositoryImpl.kt$SocialRepositoryImpl : BaseRepositoryImplSocialRepository
+ TooManyFunctions:UserRepository.kt$UserRepository : BaseRepository
+ TooManyFunctions:UserRepositoryImpl.kt$UserRepositoryImpl : BaseRepositoryImplUserRepository
+ UnnecessaryAbstractClass:HabiticaLocalNotification.kt$HabiticaLocalNotification
+ UnnecessaryAbstractClass:HabiticaPromotion.kt$HabiticaPromotion
+ UnusedPrivateMember:AppTestingLevel.kt$AppTestingLevel$identifier: String
+ UnusedPrivateMember:BaseTasksRecyclerViewAdapter.kt$BaseTasksRecyclerViewAdapter$private fun updateTask(task: Task)
+ UnusedPrivateMember:BaseTasksRecyclerViewAdapter.kt$BaseTasksRecyclerViewAdapter$private val userID: String?
+ UnusedPrivateMember:ClassSelectionActivity.kt$ClassSelectionActivity$val dialog = HabiticaProgressDialog.show(this, progressText)
+ UnusedPrivateMember:DragLinearLayout.kt$DragLinearLayout.Companion$`val`: Float
+ UnusedPrivateMember:FullProfileActivity.kt$FullProfileActivity$`val`: Float
+ UnusedPrivateMember:GemsPurchaseFragment.kt$GemsPurchaseFragment$private fun showGiftSubscriptionDialog()
+ UnusedPrivateMember:GroupFormActivity.kt$GroupFormActivity$private var autocompleteAdapter: AutocompleteAdapter? = null
+ UnusedPrivateMember:GroupInviteActivity.kt$GroupInviteActivity$private var userIdToInvite: String? = null
+ UnusedPrivateMember:NotificationOpenHandler.kt$NotificationOpenHandler.Companion$private fun openQuestDetailSCreen()
+ UnusedPrivateMember:NotificationsManager.kt$NotificationsManager$val sub = Completable.complete() .delay(delay, TimeUnit.MILLISECONDS) .subscribe( { EventBus.getDefault().post(ShowAchievementDialog(achievement, notification.id, data?.message, data?.modalText, isLastOnboardingAchievement)) }, RxErrorHandler.handleEmptyError() )
+ UnusedPrivateMember:PurchaseDialog.kt$PurchaseDialog$val sub = maybe.flatMap { for (thisItem in it) { if (thisItem.key == item.key) { ownedCount += thisItem.numberOwned } } inventoryRepository.getOwnedMounts().firstElement() }.flatMap { for (mount in it) { if (mount.key?.contains(item.key) == true) { ownedCount += if (mount.owned) 1 else 0 } } inventoryRepository.getOwnedPets().firstElement() }.subscribe( { for (pet in it) { if (pet.key?.contains(item.key) == true) { ownedCount += if (pet.trained > 0) 1 else 0 } } if (calledResult) return@subscribe calledResult = true if (!shouldWarn) { onResult(-1) return@subscribe } val remaining = totalCount - ownedCount onResult(max(0, remaining)) }, RxErrorHandler.handleEmptyError(), { if (calledResult) return@subscribe calledResult = true if (!shouldWarn) { onResult(-1) return@subscribe } val remaining = totalCount - ownedCount onResult(max(0, remaining)) } )
+ UnusedPrivateMember:PurchaseDialog.kt$PurchaseDialog$val subscription = observable .doOnNext { val event = ShowSnackbarEvent() if (snackbarText[0].isNotEmpty()) { event.text = snackbarText[0] } else { event.text = context.getString(R.string.successful_purchase, shopItem.text) } event.type = HabiticaSnackbar.SnackbarDisplayType.NORMAL event.rightIcon = priceLabel.compoundDrawables[0] when (item.currency) { "gold" -> event.rightTextColor = ContextCompat.getColor(context, R.color.text_yellow) "gems" -> event.rightTextColor = ContextCompat.getColor(context, R.color.text_green) "hourglasses" -> event.rightTextColor = ContextCompat.getColor(context, R.color.text_brand) } event.rightText = "-" + priceLabel.text EventBus.getDefault().post(event) } .flatMap { userRepository.retrieveUser(withTasks = false, forced = true) } .flatMap { inventoryRepository.retrieveInAppRewards() } .subscribe({ if (item.isTypeGear || item.currency == "hourglasses") { EventBus.getDefault().post(GearPurchasedEvent(item)) } }) { throwable -> if (throwable.javaClass.isAssignableFrom(retrofit2.HttpException::class.java)) { val error = throwable as retrofit2.HttpException if (error.code() == 401 && shopItem.currency == "gems") { MainNavigationController.navigate(R.id.gemPurchaseActivity, bundleOf(Pair("openSubscription", false))) } } }
+ UnusedPrivateMember:ScoreTaskLocallyInteractor.kt$ScoreTaskLocallyInteractor.Companion$direction: TaskDirection
+ UnusedPrivateMember:ScoreTaskLocallyInteractor.kt$ScoreTaskLocallyInteractor.Companion$task: Task
+ UnusedPrivateMember:ScoreTaskLocallyInteractor.kt$ScoreTaskLocallyInteractor.Companion$user: User
+ UnusedPrivateMember:ShopFragment.kt$ShopFragment$event: GearPurchasedEvent
+ UnusedPrivateMember:SubscriptionFragment.kt$SubscriptionFragment$event: UserSubscribedEvent?
+ UnusedPrivateMember:SubscriptionFragment.kt$SubscriptionFragment.Companion$iSG1G1: Boolean
+ UnusedPrivateMember:TaskAlarmManager.kt$TaskAlarmManager$private fun removeAlarmsForTask(task: Task)
+ UtilityClassWithPublicConstructor:AprilFoolsHandler.kt$AprilFoolsHandler
+ UtilityClassWithPublicConstructor:Date-Extensions.kt$DateUtils
+ UtilityClassWithPublicConstructor:HapticFeedbackManager.kt$HapticFeedbackManager
+ UtilityClassWithPublicConstructor:KeyboardUtil.kt$KeyboardUtil
+ UtilityClassWithPublicConstructor:NotificationOpenHandler.kt$NotificationOpenHandler
+ UtilityClassWithPublicConstructor:ScoreTaskLocallyInteractor.kt$ScoreTaskLocallyInteractor
+ VariableNaming:Buffs.kt$Buffs$@SerializedName("int") var _int: Float? = null
+ VariableNaming:Equipment.kt$Equipment$@SerializedName("int") var _int: Int = 0
+ VariableNaming:InboxAdapter.kt$InboxAdapter$private val FIRST_MESSAGE = 0
+ VariableNaming:InboxAdapter.kt$InboxAdapter$private val NORMAL_MESSAGE = 1
+ VariableNaming:Quest.kt$Quest$var RSVPNeeded: Boolean = false
+ VariableNaming:TaskDirectionData.kt$TaskDirectionData$var _tmp: TaskDirectionDataTemp? = null
+ VariableNaming:Training.kt$Training$@SerializedName("int") var _int: Float = 0f
+ VariableNaming:UserAuthSocialTokens.kt$UserAuthSocialTokens$var access_token: String? = null
+ VariableNaming:UserAuthSocialTokens.kt$UserAuthSocialTokens$var client_id: String? = null
+