Skip to content

Commit

Permalink
fix todo
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle committed Oct 14, 2023
1 parent 7e8c069 commit 3efefbf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 1 addition & 2 deletions lint/assert_no_lint_warnings.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ def _test_impl(ctx):
ctx.actions.expand_template(
template = ctx.file._bin,
output = bin,
# FIXME: not [0] - need to loop over all reports
substitutions = {"{{report}}": to_rlocation_path(ctx, reports[0])},
substitutions = {"{{reports}}": " ".join([to_rlocation_path(ctx, r) for r in reports])},
is_executable = True,
)
return [DefaultInfo(
Expand Down
12 changes: 7 additions & 5 deletions lint/assert_no_lint_warnings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \
{ echo>&2 "ERROR: cannot find $f"; exit 1; }; f=; set -e
# --- end runfiles.bash initialization v3 ---

report=$(rlocation {{report}})
if [ -s "${report}" ]; then
cat ${report}
exit 1
fi
for report in {{reports}}; do
report_file=$(rlocation "$report")
if [ -s "${report_file}" ]; then
cat ${report_file}
exit 1
fi
done

0 comments on commit 3efefbf

Please sign in to comment.