Files
gerrit/tools/BUILD
Luca Milanesio 9bf628bc06 Merge branch 'stable-3.1'
* stable-3.1:
  Update git submodules
  Update git submodules
  OperatingSystemMXBeanFactory: Add a default constructor
  Remove unnecessary @SuppressWarnings("restriction")
  Set version to 2.16.19-SNAPSHOT
  Set version to 2.16.18
  Update git submodules
  Update git submodules
  Update git submodules
  Update git submodules
  Add mirror for downloading Bazel rules.
  Update git submodules
  Upgrade JGit to v5.6.1.202002131546-r-19-ga79c5b1f1
  Upgrade gwtjsonrpc to 1.12
  CommitValidators: Use ImmutableList.Builder instead of ImmutableList.of
  Update git submodules
  Update git submodules
  Update git submodules
  Always verify PolyGerrit if bazel related files are changed
  Always run all tests, if bazel-related files are changed
  Fix implementation plan link in Contributing page
  Add test that verifies 'visibleto' predicate for group
  Make cache disk stat metric computation optional
  ReceiveCommits: Log "update failed" at severe level
  Revert "Insert Change-Id at start of trailers"
  Revert "commit-msg: Remove obsolete comments"
  Remove obsolete UpgradeFrom2_0_x init step
  Update git submodules
  Update git submodules
  Add coverageRangeChanged to notify all related listeners
  Improve documentation of change refs
  Notify all coverage listeners when coverage data is available
  Remove duplicate test method removeAnonymousRead
  ChangeQueryBuilder: Use ChangeIsVisibleToPredicate.Factory
  ChangeQueryProcessor: Use ChangeIsVisibleToPredicate.Factory
  Make the build pipeline fail if cannot post Checks feedback
  Switch to using no-AOP guice distribution
  Bazel: Use canonical_id for artifacts cached by http_file
  Fix for Memory leak in gr-plugin-endpoints
  Documentation: Clarify how to log e2e http details
  Make legacy version of the commit-msg hook available
  Don't inject CurrentUser to ChangeIsVisibleToPredicate
  HttpLogoutServlet: Test redirections with canonicalWebUrl set
  commit-msg: Remove obsolete comments
  Upgrade testcontainers to 1.14.0
  Bump asm to version 7.2
  Upgrade guice to 4.2.3
  PostReview: Avoid multiple notifications for existing reviewers
  ChangeApi: Remove deprecated getEdit method
  ChangeApi: Remove useless @Deprecated annotation in NotImplemented
  Plugin API: Remove deprecated draft workflow methods
  ErrorProne: Enable ObjectToString check at ERROR severity
  Project: Add implementation of toString
  Allow HTTP {listen,canonicalWeb}Url in tests
  Account: Add implementation of toString
  LegacyChangeNoteWrite: Remove unused newIdent method
  Update git submodules
  PolyGerrit: Document commit-container extension endpoint
  e2e-tests: Make all current scenario names unique
  e2e-tests: Make http request name unique
  e2e-tests: Fix CloneUsingBothProtocols wait times
  e2e-tests: Create/delete ReplayRecordsFromFeeder project
  e2e-tests: Unhardcode ReplayRecordsFromFeeder data
  e2e-tests: Stabilize the ReplayRecordsFromFeeder scenario
  Remove obsolete FindBugs configuration
  Elasticsearch: Remove support for EOL 6.x versions
  REST: Allow to create annotated tag with only CREATE_TAG
  Upgrade recommended version of buildifier to 2.2.1
  Bump Bazel version to 3.0.0
  CreateRefControl: Pass CurrentUser to Reachable

Change-Id: I0d30560b4ee78393ef6f25166999529c88341273
2020-04-25 02:24:15 +01:00

116 lines
4.4 KiB
Python

load(
"@bazel_tools//tools/jdk:default_java_toolchain.bzl",
"JDK9_JVM_OPTS",
"default_java_toolchain",
)
load("@rules_java//java:defs.bzl", "java_package_configuration")
exports_files(["nongoogle.bzl"])
default_java_toolchain(
name = "error_prone_warnings_toolchain",
bootclasspath = ["@bazel_tools//tools/jdk:platformclasspath.jar"],
jvm_opts = JDK9_JVM_OPTS,
package_configuration = [
":error_prone",
],
visibility = ["//visibility:public"],
)
# 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.
# TODO(davido): Enable ImmutableAnnotationChecker again when these issues are fixed:
# https://github.com/google/error-prone/issues/1348
# https://github.com/bazelbuild/bazel/issues/9378
java_package_configuration(
name = "error_prone",
javacopts = [
"-XepDisableWarningsInGeneratedCode",
"-Xep:AmbiguousMethodReference:ERROR",
"-Xep:AutoValueFinalMethods:ERROR",
"-Xep:BadAnnotationImplementation:ERROR",
"-Xep:BadComparable:ERROR",
"-Xep:BoxedPrimitiveConstructor:ERROR",
"-Xep:CannotMockFinalClass:ERROR",
"-Xep:ClassCanBeStatic:ERROR",
"-Xep:ClassNewInstance:ERROR",
"-Xep:DateFormatConstant:ERROR",
"-Xep:DefaultCharset:ERROR",
"-Xep:DoubleCheckedLocking:ERROR",
"-Xep:ElementsCountedInLoop:ERROR",
"-Xep:EqualsHashCode:ERROR",
"-Xep:EqualsIncompatibleType:ERROR",
"-Xep:ExpectedExceptionChecker:ERROR",
"-Xep:Finally:ERROR",
"-Xep:FloatingPointLiteralPrecision:ERROR",
"-Xep:FormatStringAnnotation:ERROR",
"-Xep:FragmentInjection:ERROR",
"-Xep:FragmentNotInstantiable:ERROR",
"-Xep:FunctionalInterfaceClash:ERROR",
"-Xep:FutureReturnValueIgnored:ERROR",
"-Xep:GetClassOnEnum:ERROR",
"-Xep:ImmutableAnnotationChecker:OFF",
"-Xep:ImmutableEnumChecker:ERROR",
"-Xep:IncompatibleModifiers:ERROR",
"-Xep:InjectOnConstructorOfAbstractClass:ERROR",
"-Xep:InputStreamSlowMultibyteRead:ERROR",
"-Xep:IterableAndIterator:ERROR",
"-Xep:JUnit3FloatingPointComparisonWithoutDelta:ERROR",
"-Xep:JUnitAmbiguousTestClass:ERROR",
"-Xep:LiteralClassName:ERROR",
"-Xep:MissingCasesInEnumSwitch:ERROR",
"-Xep:MissingFail:ERROR",
"-Xep:MissingOverride:ERROR",
"-Xep:MutableConstantField:ERROR",
"-Xep:NarrowingCompoundAssignment:ERROR",
"-Xep:NonAtomicVolatileUpdate:ERROR",
"-Xep:NonOverridingEquals:ERROR",
"-Xep:NullableConstructor:ERROR",
"-Xep:NullablePrimitive:ERROR",
"-Xep:NullableVoid:ERROR",
"-Xep:ObjectToString:ERROR",
"-Xep:OperatorPrecedence:ERROR",
"-Xep:OverridesGuiceInjectableMethod:ERROR",
"-Xep:PreconditionsInvalidPlaceholder:ERROR",
"-Xep:ProtoFieldPreconditionsCheckNotNull:ERROR",
"-Xep:ProtocolBufferOrdinal:ERROR",
"-Xep:ReferenceEquality:ERROR",
"-Xep:RequiredModifiers:ERROR",
"-Xep:ShortCircuitBoolean:ERROR",
"-Xep:SimpleDateFormatConstant:ERROR",
"-Xep:StaticGuardedByInstance:ERROR",
"-Xep:StringEquality:ERROR",
"-Xep:SynchronizeOnNonFinalField:ERROR",
"-Xep:TruthConstantAsserts:ERROR",
"-Xep:TypeParameterShadowing:ERROR",
"-Xep:TypeParameterUnusedInFormals:ERROR",
"-Xep:URLEqualsHashCode:ERROR",
"-Xep:UnsynchronizedOverridesSynchronized:ERROR",
"-Xep:UnusedException:ERROR",
"-Xep:WaitNotInLoop:ERROR",
"-Xep:WildcardImport:ERROR",
],
packages = ["error_prone_packages"],
)
package_group(
name = "error_prone_packages",
packages = [
"//java/...",
"//javatests/...",
"//plugins/codemirror-editor/...",
"//plugins/commit-message-length-validator/...",
"//plugins/delete-project/...",
"//plugins/download-commands/...",
"//plugins/gitiles/...",
"//plugins/hooks/...",
"//plugins/plugin-manager/...",
"//plugins/replication/...",
"//plugins/reviewnotes/...",
"//plugins/singleusergroup/...",
"//plugins/webhooks/...",
],
)