Skip to content

Commit

Permalink
[java] Allow linting only on the default test (#10792)
Browse files Browse the repository at this point in the history
After migrating Selenium tests to JUnit 5, java_junit5_test delegates
to contrib_rules_jvm’s java_test, and that adds lint tests for every
target. We want to add one set of lint tests, since the rest are going
to be identical. Therefore, we tag all but one test with no-lint
  • Loading branch information
bonigarcia authored Jun 22, 2022
1 parent 776cb82 commit 0ca6b54
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion java/private/selenium_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ def selenium_test(name, test_class, size = "medium", browsers = BROWSERS.keys(),
test_class = test_class,
size = size,
jvm_flags = BROWSERS[browser]["jvm_flags"] + jvm_flags,
tags = BROWSERS[browser]["tags"] + tags,
# Only allow linting on the default test
tags = BROWSERS[browser]["tags"] + tags + ([] if test == name else ["no-lint"]),
data = BROWSERS[browser]["data"] + data,
**stripped_args
)
Expand Down

0 comments on commit 0ca6b54

Please sign in to comment.