]> source.dussan.org Git - jgit.git/commitdiff
Enable error-prone checks by default 15/142815/1
authorDavid Pursehouse <david.pursehouse@gmail.com>
Sun, 26 May 2019 08:47:08 +0000 (17:47 +0900)
committerDavid Pursehouse <david.pursehouse@gmail.com>
Sun, 26 May 2019 08:47:08 +0000 (17:47 +0900)
Based on recent work by Dave Borowitz on the Gerrit project [1, 2].

The warnings/error configuration is unchanged, but now the checks are
enabled by default during the build rather than having to be manually
invoked.

[1] https://gerrit-review.googlesource.com/c/gerrit/+/225653
[2] https://gerrit-review.googlesource.com/c/gerrit/+/225714

Change-Id: I7f4849896af72de38880b13d64519cc93bb3d2a3
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
.bazelrc
tools/BUILD

index 2a990c7128bc56382e5e4fe877aa2beba23de3e3..3a61f8cb7adb71913e9b241d26d940d27024423e 100644 (file)
--- a/.bazelrc
+++ b/.bazelrc
@@ -2,6 +2,7 @@ build --repository_cache=~/.gerritcodereview/bazel-cache/repository
 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
index 9025e0a6d3ea4785c4acb44cc83bc95cdc0c8e6e..b39ac4f904520a2028a4cadf24e8f31dbeae4270 100644 (file)
@@ -14,8 +14,10 @@ default_java_toolchain(
     visibility = ["//visibility:public"],
 )
 
-# This EP warnings list borrowed from here:
+# 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 = [