chore: bump shellcheck v0.8.0 (#27463)

* bump shellcheck to stable verion, v0.8.0

* fix SC2086

* fix SC2269, https://www.shellcheck.net/wiki/SC2294

* fix SC2294

* do null and unset check for variable, FORCE_DELETE
This commit is contained in:
Yihau Chen 2022-09-01 14:48:20 +08:00 committed by GitHub
parent 7d17f423f3
commit e7689f7961
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 6 deletions

View File

@ -7,6 +7,6 @@ cd "$(dirname "$0")/.."
(
set -x
git ls-files -- '*.sh' ':(exclude)ci/semver_bash' \
| xargs ci/docker-run.sh koalaman/shellcheck@sha256:fe24ab9a9b6b62d3adb162f4a80e006b6a63cae8c6ffafbae45772bab85e7294 --color=always --external-sources --shell=bash
| xargs ci/docker-run.sh koalaman/shellcheck:v0.8.0 --color=always --external-sources --shell=bash
)
echo --- ok

View File

@ -397,6 +397,7 @@ cloud_ForEachInstance() {
declare name publicIp privateIp
IFS=: read -r name publicIp privateIp zone < <(echo "$info")
# shellcheck disable=SC2294
eval "$cmd" "$name" "$publicIp" "$privateIp" "$zone" "$count" "$@"
count=$((count + 1))
done

View File

@ -601,7 +601,7 @@ deploy() {
if $bootstrapLeader; then
SECONDS=0
declare bootstrapNodeDeployTime=
startBootstrapLeader "$nodeAddress" $nodeIndex "$netLogDir/bootstrap-validator-$ipAddress.log"
startBootstrapLeader "$nodeAddress" "$nodeIndex" "$netLogDir/bootstrap-validator-$ipAddress.log"
bootstrapNodeDeployTime=$SECONDS
$metricsWriteDatapoint "testnet-deploy net-bootnode-leader-started=1"
@ -609,7 +609,7 @@ deploy() {
SECONDS=0
pids=()
else
startNode "$ipAddress" $nodeType $nodeIndex
startNode "$ipAddress" "$nodeType" "$nodeIndex"
# Stagger additional node start time. If too many nodes start simultaneously
# the bootstrap node gets more rsync requests from the additional nodes than
@ -1124,7 +1124,7 @@ startnode)
nodeType=
nodeIndex=
getNodeType
startNode "$nodeAddress" $nodeType $nodeIndex
startNode "$nodeAddress" "$nodeType" "$nodeIndex"
;;
startclients)
startClients

View File

@ -4,7 +4,7 @@
SOLANA_LOCK_FILE="${SOLANA_LOCK_FILE:?}"
SECONDARY_DISK_MOUNT_POINT="${SECONDARY_DISK_MOUNT_POINT:?}"
SSH_AUTHORIZED_KEYS="${SSH_AUTHORIZED_KEYS:?}"
FORCE_DELETE="${FORCE_DELETE}"
FORCE_DELETE="${FORCE_DELETE:?}"
RC=false
if [[ -f "${SOLANA_LOCK_FILE}" ]]; then

View File

@ -13,7 +13,7 @@ Test failed during step:
${STEP}
Failure occured when running the following command:
$(eval echo "$@")"
$*"
fi
# shellcheck disable=SC2034