Skip to content

Commit 7d43747

Browse files
committed
SONARKT-400 Migrate BiometricAuthWithoutCryptoCheck to kotlin-analysis-api
1 parent 59df703 commit 7d43747

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sonar-kotlin-checks/src/main/java/org/sonarsource/kotlin/checks/BiometricAuthWithoutCryptoCheck.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
*/
1717
package org.sonarsource.kotlin.checks
1818

19+
import org.jetbrains.kotlin.analysis.api.resolution.KaFunctionCall
1920
import org.jetbrains.kotlin.psi.KtCallExpression
2021
import org.jetbrains.kotlin.psi.psiUtil.getCallNameExpression
2122
import org.jetbrains.kotlin.psi.psiUtil.isNull
22-
import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall
2323
import org.sonar.check.Rule
2424
import org.sonarsource.kotlin.api.checks.CallAbstractCheck
2525
import org.sonarsource.kotlin.api.checks.FunMatcher
@@ -33,14 +33,13 @@ private val ANDROIDX_AUTH = FunMatcher(qualifier = "androidx.biometric.Biometric
3333

3434
private const val MESSAGE = """Make sure performing a biometric authentication without a "CryptoObject" is safe here."""
3535

36-
@org.sonarsource.kotlin.api.frontend.K1only
3736
@Rule(key = "S6293")
3837
class BiometricAuthWithoutCryptoCheck : CallAbstractCheck() {
3938
override val functionsToVisit = setOf(ANDROID_HARDWARE_AUTH, ANDROIDX_AUTH)
4039

4140
override fun visitFunctionCall(
4241
callExpression: KtCallExpression,
43-
resolvedCall: ResolvedCall<*>,
42+
resolvedCall: KaFunctionCall<*>,
4443
matchedFun: FunMatcherImpl,
4544
kotlinFileContext: KotlinFileContext,
4645
) {

0 commit comments

Comments
 (0)