as31: Drop custom Kotlin Android lint, register quickfixes with extension point
This commit is contained in:
committed by
Nikolay Krasko
parent
686d8a1756
commit
11ee744340
@@ -0,0 +1,12 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INTENTION_NOT_AVAILABLE
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.lint.AndroidLintInspectionToolProvider$AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
annotation class SomeAnnotationWithClass(val cls: KClass<*>)
|
||||
|
||||
@SomeAnnotationWithClass(<caret>VectorDrawable::class)
|
||||
class VectorDrawableProvider {
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INTENTION_NOT_AVAILABLE
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.lint.AndroidLintInspectionToolProvider$AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
|
||||
fun withDefaultParameter(vector: VectorDrawable = <caret>VectorDrawable()) {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.lint.AndroidLintInspectionToolProvider$AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
fun getVectorDrawable(): VectorDrawable = <caret>VectorDrawable()
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.lint.AndroidLintInspectionToolProvider$AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
with(this) {
|
||||
return <caret>VectorDrawable()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.lint.AndroidLintInspectionToolProvider$AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
val flag = false
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
if (flag)
|
||||
return <caret>VectorDrawable()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.lint.AndroidLintInspectionToolProvider$AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
val flag = false
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
if (flag) {
|
||||
return <caret>VectorDrawable()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.KITKAT) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.lint.AndroidLintInspectionToolProvider$AndroidLintInlinedApiInspection
|
||||
|
||||
class Test {
|
||||
fun foo(): Int {
|
||||
return android.R.attr.<caret>windowTranslucentStatus
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.lint.AndroidLintInspectionToolProvider$AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
return <caret>VectorDrawable()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// INTENTION_TEXT: Surround with if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) { ... }
|
||||
// INSPECTION_CLASS: org.jetbrains.android.inspections.lint.AndroidLintInspectionToolProvider$AndroidLintNewApiInspection
|
||||
|
||||
import android.graphics.drawable.VectorDrawable
|
||||
|
||||
class VectorDrawableProvider {
|
||||
val flag = false
|
||||
fun getVectorDrawable(): VectorDrawable {
|
||||
return when (flag) {
|
||||
true -> <caret>VectorDrawable()
|
||||
else -> VectorDrawable()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user