Closed danielmachlab closed 1 year ago
I think this needs a BUILD file change too.
This needs a change to the test case.
(18:56:13) ERROR: package contains errors: examples/policy_checker: Traceback (most recent call last):
--
| File "C:/b/bk-windows-308l/bazel/rules-license/examples/policy_checker/BUILD", line 47, column 21, in <toplevel>
| license_policy_check(
| File "C:/b/bk-windows-308l/bazel/rules-license/examples/policy_checker/license_policy_check.bzl", line 74, column 5, in license_policy_check
| def license_policy_check(name, targets, policy, **kwargs):
| Error: license_policy_check() missing 1 required positional argument: targets
target
=> targets
in examples/policy_checker/BUILD
When
license_policy_check
is applied to a target that generates multiple files, the policy check fails. See below for an example error message.This seems to be due to
allow_single_file = True
in the description of the rule's attrtarget
. This change removes the line, allowing a policy check to be applied to targets producing multiple files or a single file.This change was tested by applying
license_policy_check
to ajava_binary
target (producing 2 files) and ajava_library
target (producing 1 file). Both policy checks ran successfully.