-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Apply shellcheck to vscodium root directory scripts #1569
Conversation
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.
@zpiatt Thx for the PR.
I found a single case, however I believe the variable is being utilized elsewhere in the build process so I ignored this message
Which variable was it?
|
Yep, |
All the changes you requested are complete. All scripts continue to pass jsonTmp=$(jq --arg 'tag' "${MS_TAG/\-insider/}" --arg 'commit' "${MS_COMMIT}" '. "insider.json" | .tag=$tag | .commit=$commit')
echo "$jsonTmp" > "insider.json" |
I realized as I posted this, I missed unsetting the variable here. |
It look for me. Do you want to continue in the sub-folders? |
I was planning to do a separate PR for the rest of the shell scripts as this took me a few hours to get done. If you'd prefer I can try to knock those out as apart of this, but it won't be right away. |
I did spent some time to make those Anyways, @zpiatt thank you for this PR and your feedbacks! |
All shell scripts within the
VSCodium
repository's root directory now passshellcheck
.$
and{}
from arithmetic variables (https://www.shellcheck.net/wiki/SC2004).cat
&echo
(https://www.shellcheck.net/wiki/SC2002).-r
toread
commands (https://www.shellcheck.net/wiki/SC2162).! -z
with-n
and vice-versa (style) (https://www.shellcheck.net/wiki/SC2236).Special
shellcheck
considerations:shellcheck
notes when it is unable to follow variables or files when sourced. When applicable, I ignored this message (https://www.shellcheck.net/wiki/SC1091) with a directive (https://github.com/koalaman/shellcheck/wiki/directive).shellcheck
notes when a variable is assigned but not referenced within current the script. I found a single case, however I believe the variable is being utilized elsewhere in the build process so I ignored this message (https://www.shellcheck.net/wiki/SC2154).Other small changes:
#!/usr/bin/env bash
.[[ ]]
.There's a lot here. If you need me to be more thorough, I can provide line-by-line explanations. If this looks good to you, I can continue this on the sub-directories. Also, apologies for the accidental commit on my last PR after workflows ran.