a5fe3c44d7
* stable-2.15: ElasticContainer: Use Elasticsearch 6.4.1 for V6_4 tests AbstractDaemonTest: Don't delete common server path too early Fix toolchain definitions for bazel 0.17.1 Bazel: Bump baseline to 0.17.1 Change-Id: Ic1217b4ed7495eb325cb73cfb453775e61a1181b
99 lines
3.4 KiB
Python
99 lines
3.4 KiB
Python
load(
|
|
"@bazel_tools//tools/jdk:default_java_toolchain.bzl",
|
|
"JDK9_JVM_OPTS",
|
|
"default_java_toolchain",
|
|
)
|
|
|
|
py_binary(
|
|
name = "merge_jars",
|
|
srcs = ["merge_jars.py"],
|
|
main = "merge_jars.py",
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
default_java_toolchain(
|
|
name = "error_prone_warnings_toolchain",
|
|
bootclasspath = ["@bazel_tools//tools/jdk:platformclasspath9.jar"],
|
|
jvm_opts = JDK9_JVM_OPTS,
|
|
package_configuration = [
|
|
":error_prone",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
# This EP warnings list is based on:
|
|
# https://github.com/bazelbuild/BUILD_file_generator/blob/master/tools/bazel_defs/java.bzl
|
|
java_package_configuration(
|
|
name = "error_prone",
|
|
javacopts = [
|
|
"-XepDisableWarningsInGeneratedCode",
|
|
"-Xep:MissingCasesInEnumSwitch:ERROR",
|
|
"-Xep:ReferenceEquality:WARN",
|
|
"-Xep:StringEquality:WARN",
|
|
"-Xep:WildcardImport:WARN",
|
|
"-Xep:AmbiguousMethodReference:WARN",
|
|
"-Xep:BadAnnotationImplementation:WARN",
|
|
"-Xep:BadComparable:WARN",
|
|
"-Xep:BoxedPrimitiveConstructor:ERROR",
|
|
"-Xep:CannotMockFinalClass:WARN",
|
|
"-Xep:ClassCanBeStatic:WARN",
|
|
"-Xep:ClassNewInstance:WARN",
|
|
"-Xep:DefaultCharset:ERROR",
|
|
"-Xep:DoubleCheckedLocking:WARN",
|
|
"-Xep:ElementsCountedInLoop:WARN",
|
|
"-Xep:EqualsHashCode:WARN",
|
|
"-Xep:EqualsIncompatibleType:WARN",
|
|
"-Xep:ExpectedExceptionChecker:ERROR",
|
|
"-Xep:Finally:WARN",
|
|
"-Xep:FloatingPointLiteralPrecision:WARN",
|
|
"-Xep:FragmentInjection:WARN",
|
|
"-Xep:FragmentNotInstantiable:WARN",
|
|
"-Xep:FunctionalInterfaceClash:WARN",
|
|
"-Xep:FutureReturnValueIgnored:WARN",
|
|
"-Xep:GetClassOnEnum:WARN",
|
|
"-Xep:ImmutableAnnotationChecker:WARN",
|
|
"-Xep:ImmutableEnumChecker:WARN",
|
|
"-Xep:IncompatibleModifiers:WARN",
|
|
"-Xep:InjectOnConstructorOfAbstractClass:WARN",
|
|
"-Xep:InputStreamSlowMultibyteRead:WARN",
|
|
"-Xep:IterableAndIterator:WARN",
|
|
"-Xep:JUnit3FloatingPointComparisonWithoutDelta:WARN",
|
|
"-Xep:JUnitAmbiguousTestClass:WARN",
|
|
"-Xep:LiteralClassName:WARN",
|
|
"-Xep:MissingFail:WARN",
|
|
"-Xep:MissingOverride:WARN",
|
|
"-Xep:MutableConstantField:WARN",
|
|
"-Xep:NarrowingCompoundAssignment:WARN",
|
|
"-Xep:NonAtomicVolatileUpdate:WARN",
|
|
"-Xep:NonOverridingEquals:WARN",
|
|
"-Xep:NullableConstructor:WARN",
|
|
"-Xep:NullablePrimitive:WARN",
|
|
"-Xep:NullableVoid:WARN",
|
|
"-Xep:OperatorPrecedence:WARN",
|
|
"-Xep:OverridesGuiceInjectableMethod:WARN",
|
|
"-Xep:PreconditionsInvalidPlaceholder:WARN",
|
|
"-Xep:ProtoFieldPreconditionsCheckNotNull:WARN",
|
|
"-Xep:ProtocolBufferOrdinal:WARN",
|
|
"-Xep:RequiredModifiers:WARN",
|
|
"-Xep:ShortCircuitBoolean:WARN",
|
|
"-Xep:SimpleDateFormatConstant:WARN",
|
|
"-Xep:StaticGuardedByInstance:WARN",
|
|
"-Xep:SynchronizeOnNonFinalField:WARN",
|
|
"-Xep:TruthConstantAsserts:WARN",
|
|
"-Xep:TypeParameterShadowing:WARN",
|
|
"-Xep:TypeParameterUnusedInFormals:WARN",
|
|
"-Xep:URLEqualsHashCode:WARN",
|
|
"-Xep:UnsynchronizedOverridesSynchronized:WARN",
|
|
"-Xep:WaitNotInLoop:WARN",
|
|
],
|
|
packages = ["error_prone_packages"],
|
|
)
|
|
|
|
package_group(
|
|
name = "error_prone_packages",
|
|
packages = [
|
|
"//java/...",
|
|
"//javatests/...",
|
|
],
|
|
)
|