aboutsummaryrefslogtreecommitdiff
path: root/build.gradle
diff options
context:
space:
mode:
authorEric Anderson <ejona@google.com>2018-03-08 16:55:16 -0800
committerEric Anderson <ejona@google.com>2018-03-09 11:19:20 -0800
commit1fb72ef6c1df2734003c74e5c23f39cc38d81e91 (patch)
treefd1b408dd979693042aa6a587515d061678e8ac9 /build.gradle
parent7fd22080e9b1933f67c3110d2af1b39982e5d2dc (diff)
downloadgrpc-grpc-java-1fb72ef6c1df2734003c74e5c23f39cc38d81e91.tar.gz
Ignore proto-generated code for ErrorProne
Previously if protobuf-generated code triggered ErrorProne we'd have to disable the failing check for all code in that task. With -XepExcludedPaths we can disable the ErrorProne-checking just for protobuf. Note that we continue using ErrorProne on our generated code. Also note this only applies to ErrorProne checks; JDK checks still require task-level disabling.
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle6
1 files changed, 4 insertions, 2 deletions
diff --git a/build.gradle b/build.gradle
index 7e5d0096f..9a60aba1a 100644
--- a/build.gradle
+++ b/build.gradle
@@ -175,8 +175,10 @@ subprojects {
[compileJava, compileTestJava, compileJmhJava].each() {
// Protobuf-generated code produces some warnings.
// https://github.com/google/protobuf/issues/2718
- it.options.compilerArgs += ["-Xlint:-cast", "-Xep:MissingOverride:OFF",
- "-Xep:ReferenceEquality:OFF", "-Xep:FunctionalInterfaceClash:OFF"]
+ it.options.compilerArgs += [
+ "-Xlint:-cast",
+ "-XepExcludedPaths:.*/src/generated/[^/]+/java/.*",
+ ]
}
}