Allow to suppress warnings at file level
This commit is contained in:
committed by
Nikolay Krasko
parent
712d2bdec0
commit
aff83087a3
+3
@@ -0,0 +1,3 @@
|
||||
// "Suppress 'REDUNDANT_NULLABLE' for file ${file}" "true"
|
||||
|
||||
public fun foo(): String?<caret>? = null
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
@file:Suppress("REDUNDANT_NULLABLE")
|
||||
|
||||
// "Suppress 'REDUNDANT_NULLABLE' for file ${file}" "true"
|
||||
|
||||
public fun foo(): String?<caret>? = null
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
// "Suppress 'REDUNDANT_NULLABLE' for file ${file}" "true"
|
||||
// ERROR: This annotation is not applicable to target 'file' and use site target '@file'
|
||||
|
||||
@file:Deprecated("Some")
|
||||
|
||||
package test
|
||||
|
||||
public fun foo(): String?<caret>? = null
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Suppress 'REDUNDANT_NULLABLE' for file ${file}" "true"
|
||||
// ERROR: This annotation is not applicable to target 'file' and use site target '@file'
|
||||
|
||||
@file:Deprecated("Some")
|
||||
@file:Suppress("REDUNDANT_NULLABLE")
|
||||
|
||||
package test
|
||||
|
||||
public fun foo(): String?<caret>? = null
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
// "Suppress 'REDUNDANT_NULLABLE' for file ${file}" "true"
|
||||
/** Some Comment **/
|
||||
|
||||
package test
|
||||
|
||||
public fun foo(): String?<caret>? = null
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Suppress 'REDUNDANT_NULLABLE' for file ${file}" "true"
|
||||
/** Some Comment **/
|
||||
|
||||
@file:Suppress("REDUNDANT_NULLABLE")
|
||||
|
||||
package test
|
||||
|
||||
public fun foo(): String?<caret>? = null
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
// "Suppress 'REDUNDANT_NULLABLE' for file ${file}" "true"
|
||||
@file:Suppress("unused")
|
||||
|
||||
public fun foo(): String?<caret>? = null
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// "Suppress 'REDUNDANT_NULLABLE' for file ${file}" "true"
|
||||
@file:Suppress("unused", "REDUNDANT_NULLABLE")
|
||||
|
||||
public fun foo(): String?<caret>? = null
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
// "class com.intellij.codeInspection.SuppressIntentionAction" "false"
|
||||
// ACTION: Suppress 'INTEGER_OVERFLOW' for fun foo
|
||||
// ACTION: Suppress 'INTEGER_OVERFLOW' for file inAnnotationArgument.kt
|
||||
|
||||
@Ann(Integer.MAX_VALUE<caret> + 1)
|
||||
fun foo() {}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// "class com.intellij.codeInspection.SuppressIntentionAction" "false"
|
||||
// ACTION: Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for class Child
|
||||
// ACTION: Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for file inClassHeader.kt
|
||||
|
||||
open class Base(s: String)
|
||||
class Child: Base(""<caret>!!)
|
||||
@@ -1,5 +1,6 @@
|
||||
// "class com.intellij.codeInspection.SuppressIntentionAction" "false"
|
||||
// ACTION: Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for fun foo
|
||||
// ACTION: Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for parameter s
|
||||
// ACTION: Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for file inDefaultArgument.kt
|
||||
|
||||
fun foo(s: String = ""<caret>!!) {}
|
||||
@@ -1,4 +1,5 @@
|
||||
// "class com.intellij.codeInspection.SuppressIntentionAction" "false"
|
||||
// ACTION: Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for fun foo
|
||||
// ACTION: Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for file inExpressionBody.kt
|
||||
|
||||
fun foo() = ""<caret>!!
|
||||
+1
@@ -1,6 +1,7 @@
|
||||
// "class com.intellij.codeInspection.SuppressIntentionAction" "false"
|
||||
// ACTION: Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for fun foo
|
||||
// ACTION: Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for val bar
|
||||
// ACTION: Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for file inLocalValInitializer.kt
|
||||
|
||||
fun foo() {
|
||||
val bar = ""<caret>!!
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// "class com.intellij.codeInspection.SuppressIntentionAction" "false"
|
||||
// ACTION: Suppress 'REDUNDANT_NULLABLE' for fun foo
|
||||
// ACTION: Suppress 'REDUNDANT_NULLABLE' for parameter s
|
||||
// ACTION: Suppress 'REDUNDANT_NULLABLE' for file inParameterType.kt
|
||||
|
||||
fun foo(s: String?<caret>?) {}
|
||||
Vendored
+1
@@ -1,6 +1,7 @@
|
||||
// "class com.intellij.codeInspection.SuppressIntentionAction" "false"
|
||||
// ACTION: Suppress 'REDUNDANT_NULLABLE' for fun foo
|
||||
// ACTION: Suppress 'REDUNDANT_NULLABLE' for parameter x
|
||||
// ACTION: Suppress 'REDUNDANT_NULLABLE' for file inParameterTypeInFunctionLiteral.kt
|
||||
|
||||
fun foo() {
|
||||
any {
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// "class com.intellij.codeInspection.SuppressIntentionAction" "false"
|
||||
// ACTION: Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for val foo
|
||||
// ACTION: Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for file inPropertyInitializer.kt
|
||||
|
||||
val foo = ""<caret>!!
|
||||
@@ -1,5 +1,6 @@
|
||||
// "class com.intellij.codeInspection.SuppressIntentionAction" "false"
|
||||
// ACTION: Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for fun foo
|
||||
// ACTION: Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for file objectLiteral.kt
|
||||
|
||||
fun foo() {
|
||||
object : Base(""<caret>!!) {
|
||||
|
||||
+1
@@ -1,6 +1,7 @@
|
||||
// "class com.intellij.codeInspection.SuppressIntentionAction" "false"
|
||||
// ACTION: Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for fun foo
|
||||
// ACTION: Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for val a
|
||||
// ACTION: Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for file objectLiteralInsideExpression.kt
|
||||
|
||||
fun foo() {
|
||||
val a = object : Base(""<caret>!!) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// "class com.intellij.codeInspection.SuppressIntentionAction" "false"
|
||||
// ACTION: Suppress 'REDUNDANT_NULLABLE' for class Child
|
||||
// ACTION: Suppress 'REDUNDANT_NULLABLE' for file supretype.kt
|
||||
|
||||
open class Base<T>
|
||||
class Child: Base<String?<caret>?>()
|
||||
Reference in New Issue
Block a user