Merge branch 'stable-2.14' into stable-2.15
* stable-2.14:
Bazel: Enable Error-Prone by default
Change-Id: I5f29e813678bb161f7fa269e745f3da92b92294c
diff --git a/.bazelrc b/.bazelrc
index 4a89eed..d6d4ce6 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -3,6 +3,7 @@
build --experimental_strict_action_env
build --action_env=PATH
build --disk_cache=~/.gerritcodereview/bazel-cache/cas
+build --java_toolchain //tools:error_prone_warnings_toolchain
test --build_tests_only
test --test_output=errors
diff --git a/tools/BUILD b/tools/BUILD
index 7760b20..1017414 100644
--- a/tools/BUILD
+++ b/tools/BUILD
@@ -21,8 +21,10 @@
visibility = ["//visibility:public"],
)
-# This EP warnings list is based on:
+# Error Prone errors enabled by default; see ../.bazelrc for how this is
+# 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.
java_package_configuration(
name = "error_prone",
javacopts = [
@@ -120,5 +122,11 @@
"//gerrit-util-http/...",
"//gerrit-util-ssl/...",
"//gerrit-war/...",
+ "//plugins/commit-message-length-validator/...",
+ "//plugins/download-commands/...",
+ "//plugins/hooks/...",
+ "//plugins/replication/...",
+ "//plugins/reviewnotes/...",
+ "//plugins/singleusergroup/...",
],
)