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
Vampire
02/03/2023, 2:23 PM
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
nroi
02/03/2023, 2:24 PM
yes, thanks, I've just noticed this is a compiler warning.
nroi
02/03/2023, 2:24 PM
I don't get that error when compiling via gradle. But compiling via gradle is not a solution for me.
v
Vampire
02/03/2023, 2:24 PM
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.
Vampire
02/03/2023, 2:25 PM
Hm, strange that you don't get it through Gradle if it is a compiler warning
n
nroi
02/03/2023, 2:25 PM
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.
nroi
02/03/2023, 2:26 PM
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.