Skip to content
This repository was archived by the owner on Mar 29, 2023. It is now read-only.

Commit 956bd7d

Browse files
committed
Enable error-prone checks by default
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: I112146911d3067bb5283cdf7b188be73f8f8f1e8
1 parent ccde5c6 commit 956bd7d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.bazelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ build --repository_cache=~/.gerritcodereview/bazel-cache/repository
33
build --experimental_strict_action_env
44
build --action_env=PATH
55
build --disk_cache=~/.gerritcodereview/bazel-cache/cas
6+
build --java_toolchain //tools:error_prone_warnings_toolchain
67

78
test --build_tests_only
89
test --test_output=errors

tools/BUILD

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ default_java_toolchain(
1414
visibility = ["//visibility:public"],
1515
)
1616

17-
# This EP warnings list borrowed from here:
17+
# Error Prone errors enabled by default; see ../.bazelrc for how this is
18+
# enabled. This warnings list is originally based on:
1819
# https://github.com/bazelbuild/BUILD_file_generator/blob/master/tools/bazel_defs/java.bzl
20+
# However, feel free to add any additional errors. Thus far they have all been pretty useful.
1921
java_package_configuration(
2022
name = "error_prone",
2123
javacopts = [

0 commit comments

Comments
 (0)