I've been using detekt `1.19.0-RC1` on my Android ...
# detekt
m
I've been using detekt
1.19.0-RC1
on my Android project. The type resolution tasks cannot find Android classes so they report many false positives. For example
Copy code
val sensorManager: SensorManager = context.getSystemService() ?: return null
    val sensor = sensorManager.getDefaultSensor(sensorType) ?: return null
Reports unreachable code for everything after the first
?: return null
because it cannot find the type of
context
and seems to assume that it always returns null. See
UnsafeCast
warnings also when checking and then casting for classes that extend
View
. Is there any configuration that I can do to make detekt find the Android classes during type resolution?
Just saw RC2 was out, upgrading to that removed the false warnings
g
Yup we already fixed that 👍