Enable ImmutableAnnotationChecker
The following issue has been fixed and check can be enabled:
https://github.com/google/error-prone/issues/1348
Change-Id: I4caa6b4f54efa3d68d8e2c35a9e7f8b1871f3ca8
diff --git a/tools/BUILD b/tools/BUILD
index 545a206..890ccd4 100644
--- a/tools/BUILD
+++ b/tools/BUILD
@@ -69,9 +69,6 @@
# enabled. This warnings list is originally based on:
# https://github.com/bazelbuild/BUILD_file_generator/blob/master/tools/bazel_defs/java.bzl
# However, feel free to add any additional errors. Thus far they have all been pretty useful.
-# TODO(davido): Enable ImmutableAnnotationChecker again when these issues are fixed:
-# https://github.com/google/error-prone/issues/1348
-# https://github.com/bazelbuild/bazel/issues/9378
java_package_configuration(
name = "error_prone",
javacopts = [
@@ -99,7 +96,7 @@
"-Xep:FunctionalInterfaceClash:ERROR",
"-Xep:FutureReturnValueIgnored:ERROR",
"-Xep:GetClassOnEnum:ERROR",
- "-Xep:ImmutableAnnotationChecker:OFF",
+ "-Xep:ImmutableAnnotationChecker:ERROR",
"-Xep:ImmutableEnumChecker:ERROR",
"-Xep:IncompatibleModifiers:ERROR",
"-Xep:InjectOnConstructorOfAbstractClass:ERROR",