diff --git a/toolchains/default_java_toolchain.bzl b/toolchains/default_java_toolchain.bzl index 4ec8961..7e075cd 100644 --- a/toolchains/default_java_toolchain.bzl +++ b/toolchains/default_java_toolchain.bzl @@ -67,6 +67,9 @@ DEFAULT_JAVACOPTS = [ "-Xep:LenientFormatStringValidation:OFF", "-Xep:ReturnMissingNullable:OFF", "-Xep:UseCorrectAssertInTests:OFF", + # Please see https://github.com/bazelbuild/bazel/issues/25927#issuecomment-2825206105 + # we need to make sure not to filter any warnings so that Bazel can trigger them as errors. + "-Xmaxwarns -1", ] # If this is changed, the docs for "{,tool_}java_language_version" also