From 624eb37eb07ca14aafd4f51ad4d832ec904be55e Mon Sep 17 00:00:00 2001 From: Simon Stewart Date: Fri, 3 Feb 2023 17:49:56 +0000 Subject: [PATCH] It is sometimes helpful to know how to generate the lint tests from outside contrib_rules_jvm (#133) --- java/private/library.bzl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/java/private/library.bzl b/java/private/library.bzl index 84b7f8da..775f3cf5 100644 --- a/java/private/library.bzl +++ b/java/private/library.bzl @@ -4,7 +4,7 @@ load("//java/private:checkstyle.bzl", "checkstyle_test") load("//java/private:pmd.bzl", "pmd_test") load("//java/private:spotbugs.bzl", "spotbugs_test") -def _create_lint_tests(name, **kwargs): +def create_lint_tests(name, **kwargs): srcs = kwargs.get("srcs", []) if len(srcs) == 0: @@ -52,22 +52,22 @@ def _create_lint_tests(name, **kwargs): def java_binary(name, **kwargs): """Adds linting tests to Bazel's own `java_binary`""" - _create_lint_tests(name, **kwargs) + create_lint_tests(name, **kwargs) native.java_binary(name = name, **kwargs) def java_library(name, **kwargs): """Adds linting tests to Bazel's own `java_library`""" - _create_lint_tests(name, **kwargs) + create_lint_tests(name, **kwargs) native.java_library(name = name, **kwargs) def java_test(name, **kwargs): """Adds linting tests to Bazel's own `java_test`""" - _create_lint_tests(name, **kwargs) + create_lint_tests(name, **kwargs) native.java_test(name = 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) + create_lint_tests(name, **kwargs) _java_export( name = name, maven_coordinates = maven_coordinates,