Is it possible to suppress the following warning i...
# getting-started
n
Is it possible to suppress the following warning in IntelliJ?
Copy code
Kotlin: Override 'fun xxx' has incorrect nullability in its signature comparing with overridden 'fun xxx'
It can be suppressed with
@Suppress("WRONG_NULLABILITY_FOR_JAVA_OVERRIDE")
, but I'd like to suppress it globally. I haven't found the matching option in Editor > Inspections.
v
Do you get the same error when compiling through build tool? I guess so, then it is a Compiler error, not an IJ inspection you could disable.
n
yes, thanks, I've just noticed this is a compiler warning.
I don't get that error when compiling via gradle. But compiling via gradle is not a solution for me.
v
For the next time you can also Alt+Return on the highlighted code, then open the context menu of the quickfix and in the top see the inspection that triggers the finding.
Hm, strange that you don't get it through Gradle if it is a compiler warning
n
yes, I was actually wondering why the quickfix did not include the option to disable this inspection via IntelliJ, but it's because as you mentioned, it's a compiler warning, not an IntelliJ inspection.
I think it's because the
build.gradle
is configured to use an older version of Kotlin, which is
1.5.21
. IntelliJ uses 1.6, but I can't set an older version in IntelliJ.