From 583ad38f8fcf42d9abe8a8e47aa823a9eb0e7eda Mon Sep 17 00:00:00 2001 From: Eric Liang Date: Thu, 27 Aug 2020 12:36:57 -0700 Subject: [PATCH] remove shellcheck bazel (#10369) --- ci/travis/format.sh | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/ci/travis/format.sh b/ci/travis/format.sh index ce16097ef..7702ec0ad 100755 --- a/ci/travis/format.sh +++ b/ci/travis/format.sh @@ -78,10 +78,6 @@ SHELLCHECK_FLAGS=( --exclude=2207 # "Prefer mapfile or read -a to split command output (or quote to avoid splitting)." -- these aren't compatible with macOS's old Bash ) -SHELLCHECK_BAZEL_FLAGS=( - --exclude=2043 # "This loop will only ever run once. Bad quoting or missing glob/expansion?" -- Bazel preprocessing can trigger this needlessly -) - YAPF_FLAGS=( '--style' "$ROOT/.style.yapf" '--recursive' @@ -110,10 +106,6 @@ shellcheck_scripts() { shellcheck "${SHELLCHECK_FLAGS[@]}" "$@" } -shellcheck_bazel() { - "${ROOT}"/ci/travis/bazel.py shellcheck "mnemonic(\"Genrule\", deps(//:*))" shellcheck "${SHELLCHECK_FLAGS[@]}" "${SHELLCHECK_BAZEL_FLAGS[@]}" "$@" -} - # Format specified files format_files() { local shell_files=() python_files=() bazel_files=() @@ -150,12 +142,6 @@ format_files() { fi if shellcheck --shell=sh --format=diff - < /dev/null; then - if [ 0 -lt "${#bazel_files[@]}" ]; then - if ! shellcheck_bazel; then - echo "Bazel genrule() scripts cannot be fixed automatically; please fix manually." 1>&2 - shellcheck_bazel --format=diff - fi - fi if [ 0 -lt "${#shell_files[@]}" ]; then local difference difference="$(shellcheck_scripts --format=diff "${shell_files[@]}" || true && printf "-")" @@ -190,9 +176,6 @@ format_all() { fi if command -v shellcheck >/dev/null; then - echo "$(date)" "shellcheck bazel...." - shellcheck_bazel - local shell_files non_shell_files non_shell_files=($(git ls-files -- ':(exclude)*.sh')) shell_files=($(git ls-files -- '*.sh')) @@ -242,10 +225,6 @@ format_changed() { fi if command -v shellcheck >/dev/null; then - if ! git diff --diff-filter=ACRM --quiet --exit-code "$MERGEBASE" -- 'WORKSPACE' 'WORKSPACE.*' 'BUILD.*' '*.bzl' '*.bazel' &>/dev/null; then - shellcheck_bazel - fi - local shell_files non_shell_files non_shell_files=($(git diff --name-only --diff-filter=ACRM "$MERGEBASE" -- ':(exclude)*.sh')) shell_files=($(git diff --name-only --diff-filter=ACRM "$MERGEBASE" -- '*.sh'))