Skip to content

Commit

Permalink
checkstyle: Short timeout by default (#101)
Browse files Browse the repository at this point in the history
Mark check style test add medium and short.

This reduces noise with the `--test_verbose_timeout_warnings` option of Bazel.
  • Loading branch information
stevebarrau authored Oct 19, 2022
1 parent 7b4dced commit b74567e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 9 additions & 1 deletion java/private/checkstyle.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def _checkstyle_impl(ctx):
),
]

checkstyle_test = rule(
_checkstyle_test = rule(
_checkstyle_impl,
attrs = {
"srcs": attr.label_list(
Expand All @@ -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
)
2 changes: 0 additions & 2 deletions java/private/library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b74567e

Please sign in to comment.