[ci] fix some shellcheck errors in scripts#6504
[ci] fix some shellcheck errors in scripts#6504shreyash2002 wants to merge 4 commits intomicrosoft:masterfrom
Conversation
…icrosoft#6498) - Errors- SC2086 (info) : Double quote to prevent globbing and word splitting
…t#6498) - Fixed SC2086 (info): Double quote to prevent globbing and word splitting.
…icrosoft#6498) - fixed SC2086 (info): Double quote to prevent globbing and word splitting.
|
@microsoft-github-policy-service agree |
|
hi @jameslamb |
jameslamb
left a comment
There was a problem hiding this comment.
Thanks for taking the time to contribute to LightGBM!
I've requested some changes here. I've also made some edits:
- removed
fixed #6498from the PR title... this does not FIX that issue, it just helps make some progress towards it - added a link to #6498 in the PR description... please always do this when you contribute here and your contribution relates to other discussions in the project
- Used double quotes around entire word as suggested - microsoft#6498
jameslamb
left a comment
There was a problem hiding this comment.
thanks for your help, please see my recent suggestions
| "llvm-${CLANG_VERSION}"-dev \ | ||
| "llvm-${CLANG_VERSION}"-tools \ | ||
| "libomp-${CLANG_VERSION}"-dev \ | ||
| "libc++-${CLANG_VERSION}"-dev \ | ||
| "libc++abi-${CLANG_VERSION}"-dev \ | ||
| "libclang-common-${CLANG_VERSION}"-dev \ | ||
| "libclang-${CLANG_VERSION}"-dev \ | ||
| "libclang-cpp${CLANG_VERSION}"-dev \ | ||
| "libunwind-${CLANG_VERSION}"-dev |
There was a problem hiding this comment.
| "llvm-${CLANG_VERSION}"-dev \ | |
| "llvm-${CLANG_VERSION}"-tools \ | |
| "libomp-${CLANG_VERSION}"-dev \ | |
| "libc++-${CLANG_VERSION}"-dev \ | |
| "libc++abi-${CLANG_VERSION}"-dev \ | |
| "libclang-common-${CLANG_VERSION}"-dev \ | |
| "libclang-${CLANG_VERSION}"-dev \ | |
| "libclang-cpp${CLANG_VERSION}"-dev \ | |
| "libunwind-${CLANG_VERSION}"-dev | |
| "llvm-${CLANG_VERSION}-dev" \ | |
| "llvm-${CLANG_VERSION}-tools" \ | |
| "libomp-${CLANG_VERSION}-dev" \ | |
| "libc++-${CLANG_VERSION}-dev" \ | |
| "libc++abi-${CLANG_VERSION}-dev" \ | |
| "libclang-common-${CLANG_VERSION}-dev" \ | |
| "libclang-${CLANG_VERSION}-dev" \ | |
| "libclang-cpp${CLANG_VERSION}-dev" \ | |
| "libunwind-${CLANG_VERSION}-dev" |
Please don't leave quotes in the middle of these words, as I asked in #6504 (comment).
| # overwriting the stuff in /usr/bin is simpler and more reliable than | ||
| # updating PATH, LD_LIBRARY_PATH, etc. | ||
| cp --remove-destination /usr/lib/llvm-${CLANG_VERSION}/bin/* /usr/bin/ | ||
| cp --remove-destination /usr/lib/llvm-"${CLANG_VERSION}"/bin/* /usr/bin/ |
There was a problem hiding this comment.
| cp --remove-destination /usr/lib/llvm-"${CLANG_VERSION}"/bin/* /usr/bin/ | |
| cp --remove-destination "$(echo /usr/lib/llvm-${CLANG_VERSION}/bin/*)" /usr/bin/ |
| --arg pr_branch "$(echo $pr | jq '.head.ref')" \ | ||
| --arg pr_number "$(echo "$pr" | jq '.number')" \ | ||
| --arg pr_sha "$(echo "$pr" | jq '.head.sha')" \ | ||
| --arg pr_branch "$(echo "$pr" | jq '.head.ref')" \ |
There was a problem hiding this comment.
Putting double quotes inside other double quotes like this requires escaping. To avoid that, please revert these changes and instead add the following comment on line 37 (directly above data=$():
# shellcheck disable=SC0286|
@shreyash2002 are you planning to return to this pull request? Do you need any help? |
|
@shreyash2002 Thanks for your work here! Please pick up any other issue to contribute if you wish. |
|
This pull request has been automatically locked since there has not been any recent activity since it was closed. |
Contributes to #6498