From b74567e5af3ddf7f9406fecc2606bce930fce3bc Mon Sep 17 00:00:00 2001 From: Steve Barrau <98589981+stevebarrau@users.noreply.github.com> Date: Wed, 19 Oct 2022 15:16:39 +0100 Subject: [PATCH] checkstyle: Short timeout by default (#101) Mark check style test add medium and short. This reduces noise with the `--test_verbose_timeout_warnings` option of Bazel. --- java/private/checkstyle.bzl | 10 +++++++++- java/private/library.bzl | 2 -- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/java/private/checkstyle.bzl b/java/private/checkstyle.bzl index 6d40eb61..c12d3535 100644 --- a/java/private/checkstyle.bzl +++ b/java/private/checkstyle.bzl @@ -42,7 +42,7 @@ def _checkstyle_impl(ctx): ), ] -checkstyle_test = rule( +_checkstyle_test = rule( _checkstyle_impl, attrs = { "srcs": attr.label_list( @@ -65,3 +65,11 @@ checkstyle_test = rule( test = True, doc = """Use checkstyle to lint the `srcs`.""", ) + +def checkstyle_test(name, size = "medium", timeout = "short", **kwargs): + _checkstyle_test( + name = name, + size = size, + timeout = timeout, + **kwargs + ) diff --git a/java/private/library.bzl b/java/private/library.bzl index 4b1515b2..84b7f8da 100644 --- a/java/private/library.bzl +++ b/java/private/library.bzl @@ -22,8 +22,6 @@ def _create_lint_tests(name, **kwargs): # regardless of the library or test tags (e.g. even if we exclude # sidecar tests, we want to lint them). tags = ["lint", "checkstyle", "java-checkstyle"], - size = "small", - timeout = "moderate", ) pmd = get_lint_config("java-pmd", tags)