Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only run lint_tests on java_library not java_export #315

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion java/private/library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ def java_test(name, **kwargs):

def java_export(name, maven_coordinates, pom_template = None, deploy_env = None, visibility = None, **kwargs):
"""Adds linting tests to `rules_jvm_external`'s `java_export`"""
create_lint_tests(name, **kwargs)

# Only run the lint tests on the java_library target and not the java_export target which will include
# other sources within it.
# https://github.com/bazel-contrib/rules_jvm_external/blob/534e62d14655e01048b90ef89ab1acaf0caa7348/private/rules/java_export.bzl#L85C5-L85C31
lib_name = "%s-lib" % name
create_lint_tests(lib_name, **kwargs)
_java_export(
name = name,
maven_coordinates = maven_coordinates,
Expand Down
Loading