override fun visitReturnExpression(node: UReturnExpression) {
println(0)
}
val message = DEFAULT_MSG
val location = node.operatorIdentifier?.let {
context.getLocation(it)
} ?: context.getLocation(node)
context.report(ISSUE, node, location, message)
override fun visitSimpleNameReferenceExpression(node: USimpleNameReferenceExpression) {
println(0)
//(((node as KotlinUSimpleReferenceExpression).uastParent as KotlinUQualifiedReferenceExpression).receiver as KotlinUCallableReferenceExpression).qualifierType?.canonicalText
}
} else {
val message = DEFAULT_MSG
val location = node.operatorIdentifier?.let {
context.getLocation(it)
} ?: context.getLocation(node)
context.report(ISSUE, node, location, message)
override fun visitSuperExpression(node: USuperExpression) {
println(0)
}
override fun visitSwitchClauseExpression(node: USwitchClauseExpression) {
println(0)
}
override fun visitSwitchExpression(node: USwitchExpression) {
println(0)
}
override fun visitThisExpression(node: UThisExpression) {
println(0)
}
override fun visitThrowExpression(node: UThrowExpression) {
println(0)
}
override fun visitTryExpression(node: UTryExpression) {
println(0)
}
override fun visitTypeReferenceExpression(node: UTypeReferenceExpression) {
println(0)
}
override fun visitUnaryExpression(node: UUnaryExpression) {
println(0)
}
override fun visitVariable(node: UVariable) {
println(0)
}
override fun visitWhileExpression(node: UWhileExpression) {
println(0)
}
override fun visitYieldExpression(node: UYieldExpression) {
println(0)
}
}
}
...
...
@@ -216,20 +354,18 @@ class FlowDelegateUsageDetector : Detector(), SourceCodeScanner {
private const val MEDIA_STREAM_TRACK = "org.webrtc.MediaStreamTrack"
private const val DEFAULT_MSG =
"Suspicious equality check: MediaStreamTracks should not be checked for equality. Check id() instead."
"Incorrect flow property usage: Only properties marked with the @FlowObservable annotation can be observed using `io.livekit.android.util.flow`."