Skip to content

Commit fa1c184

Browse files
authored
Fix pmd_test to use short_path instead of path for sources (#390)
From https://bazel.build/rules/lib/builtins/File#path: > Use the `short_path` for the path under which the file is mapped if it's in the runfiles of a binary. Fixes an issue with `pmd_test` not finding sources produced by other targets.
1 parent 320003f commit fa1c184

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/private/pmd.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def _pmd_test_impl(ctx):
2121
file_list = ctx.actions.declare_file("%s-pmd-srcs" % ctx.label.name)
2222
ctx.actions.write(
2323
file_list,
24-
",".join([src.path for src in ctx.files.srcs]),
24+
",".join([src.short_path for src in ctx.files.srcs]),
2525
)
2626
cmd.extend(["--file-list", file_list.short_path])
2727
inputs.extend(ctx.files.srcs)

0 commit comments

Comments
 (0)