From dc527a3c80eed05f598aefac1f3526107cb3b526 Mon Sep 17 00:00:00 2001 From: Raul Jordan Date: Mon, 21 Mar 2022 17:03:52 +0000 Subject: [PATCH] Remove Visibility Check Script for Bazel (#10391) Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com> --- hack/check_visibility.sh | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100755 hack/check_visibility.sh diff --git a/hack/check_visibility.sh b/hack/check_visibility.sh deleted file mode 100755 index 09cea8703..000000000 --- a/hack/check_visibility.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# Continous Integration script to check that BUILD.bazel files have the correct -# visibility. - -# Protected packages are: -# //beacon-chain/... -# //validator/... - -# Duplicate redirect 5 to stdout so that it can be captured, but still printed -# nicely. -exec 5>&1 - -# Run gazelle while piping a copy of the output to stdout via 5. -changes=$( -bazel --batch --bazelrc=.buildkite-bazelrc query 'visible(//... except (//beacon-chain/... union //validator/...), (//beacon-chain/... union //validator/...)) except attr("tags", "manual", //...)' | tee >(cat - >&5) -) - -# If the captured stdout is not empty then targets are exposed! -if [ -z "$changes" ] -then - echo "OK: Visibility is good." - exit 0 -else - echo "FAIL: The above targets belong to protected packages and the targets \ -are visible outside of their package!" - echo "Please reduce the target visibility." - exit 1 -fi