If a compiler plugin defines its own warnings, sho...
# compiler
w
If a compiler plugin defines its own warnings, should I expect to be able to
"-Xwarning-level=<custom_warning>:error"
them? Specifically I'm trying to raise the `SUGGEST_CLASS_INJECTION` inspection level to
error
but I get an
e: Warning with name "SUGGEST_CLASS_INJECTION" does not exist
error, even if I only add the compiler warning when the plugin is applied:
Copy code
plugins {
  id 'dev.zacsweers.metro'
}

tasks.withType(KotlinCompile).configureEach {
  compilerOptions.freeCompilerArgs.addAll(
    "-Xwarning-level=SUGGEST_CLASS_INJECTION:error",
  )
}
this happens for
:compileKotlin
tasks in jvm modules. Is it an issue with the compiler plugin or Kotlin? Or my setup?
d
Have you registered your plugin diagnostics in the registrar, like here?
z
looks like that's missing, let me fix
❤️ 1
w
Thank you both 🙇