Android Lint: Use Uast to check for SuppressLint annotation
#KT-14800 Fixed Target versions 1.1.5
This commit is contained in:
+1
-1
@@ -73,7 +73,7 @@ class JavaPerformanceTest(context: Context, attrs: AttributeSet, defStyle: Int)
|
||||
|
||||
// This one should not be reported:
|
||||
@SuppressLint("UseSparseArrays")
|
||||
val myOtherMap = <warning descr="Use `new SparseArray<Object>(...)` instead for better performance">HashMap<Int, Any>()</warning>
|
||||
val myOtherMap = HashMap<Int, Any>()
|
||||
}
|
||||
|
||||
protected fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int,
|
||||
|
||||
Vendored
+1
-1
@@ -61,7 +61,7 @@ class ToastTest(context: Context) : Activity() {
|
||||
|
||||
private fun checkSuppress2(context: Context) {
|
||||
@android.annotation.SuppressLint("ShowToast")
|
||||
val toast = Toast.<warning descr="Toast created but not shown: did you forget to call `show()` ?">makeText</warning>(this, "MyToast", Toast.LENGTH_LONG)
|
||||
val toast = Toast.makeText(this, "MyToast", Toast.LENGTH_LONG)
|
||||
}
|
||||
|
||||
class R {
|
||||
|
||||
Reference in New Issue
Block a user