-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[CI] Fix shellcheck warning in pre-commit #50288
base: master
Are you sure you want to change the base?
[CI] Fix shellcheck warning in pre-commit #50288
Conversation
@MortalHappiness PTAL. |
Please also add Lines 18 to 34 in 8a8a03a
|
Added. |
@@ -54,7 +56,9 @@ build_x86_64() { | |||
build_aarch64() { | |||
# Cleanup environments | |||
rm -rf /tmp/bazel_event_logs | |||
cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT | |||
# shellcheck disable=SC2317 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does here need SC2317?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cause here we are using trap to invoke cleanup function, and it will make the shellcheck think it is unreachable, but this is a false positive.
Signed-off-by: owenowenisme <[email protected]>
Signed-off-by: owenowenisme <[email protected]>
Signed-off-by: owenowenisme <[email protected]>
b25dc3e
to
ab4960f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lint check seems failing?
Signed-off-by: owenowenisme <[email protected]>
@aslonnie
I refer to the issue koalaman/shellcheck#2437 |
we should not use pre-commit that uses containers.. we should not assume that docker exists on the system for pre-commit to run. |
So is it okay for ray to use |
seems fine to me. or just remove it from pre-commit.. or write our own. pre-commit supports custom/local scripts too. |
@aslonnie Already changed to shellcheck-py and passed the ci-linter check. |
Why are these changes needed?
Related issue number
#47991
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.