Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Ignore shellcheck error in copy-paste code #22530

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tools/bash/runfiles/runfiles.bash
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
# # --- begin runfiles.bash initialization v3 ---
# # Copy-pasted from the Bazel Bash runfiles library v3.
# set -uo pipefail; set +e; f=bazel_tools/tools/bash/runfiles/runfiles.bash
# # shellcheck disable=SC1090
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs suggest a different workaround, should we use that instead?
https://www.shellcheck.net/wiki/SC1090

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried that but couldn't figure it out how to get it work because the file is part of runfile so depending on how shellcheck is executed, it may not be able to locate it. Having # shellcheck source=/dev/null is pretty much the same as ignoring.

# source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \
# source "$(grep -sm1 "^$f " "${RUNFILES_MANIFEST_FILE:-/dev/null}" | cut -f2- -d' ')" 2>/dev/null || \
# source "$0.runfiles/$f" 2>/dev/null || \
Expand Down
Loading