From 3efefbf6d2510b859a1e88a8d802343497bc9bf5 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Sat, 14 Oct 2023 08:44:19 -0700 Subject: [PATCH] fix todo --- lint/assert_no_lint_warnings.bzl | 3 +-- lint/assert_no_lint_warnings.sh | 12 +++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lint/assert_no_lint_warnings.bzl b/lint/assert_no_lint_warnings.bzl index c2c3b7bd..cd0dceb1 100644 --- a/lint/assert_no_lint_warnings.bzl +++ b/lint/assert_no_lint_warnings.bzl @@ -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( diff --git a/lint/assert_no_lint_warnings.sh b/lint/assert_no_lint_warnings.sh index 72adf422..98e6093c 100644 --- a/lint/assert_no_lint_warnings.sh +++ b/lint/assert_no_lint_warnings.sh @@ -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 \ No newline at end of file